zoukankan      html  css  js  c++  java
  • FastReport编码 table数据模板

     

    <?xml version="1.0" encoding="utf-8"?>
    <Report ScriptLanguage="CSharp" ReferencedAssemblies="System.dll&#13;&#10;System.Drawing.dll&#13;&#10;System.Windows.Forms.dll&#13;&#10;System.Data.dll&#13;&#10;System.Xml.dll&#13;&#10;System.Core.dll&#13;&#10;System.Drawing.dll" ReportInfo.Created="05/21/2020 15:51:04" ReportInfo.Modified="06/19/2020 14:13:19" ReportInfo.CreatorVersion="2019.3.2.0">
    <ScriptText>using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Drawing;
    using System.Data;
    using FastReport;
    using FastReport.Data;
    using FastReport.Dialog;
    using FastReport.Barcode;
    using FastReport.Table;
    using FastReport.Utils;
    using System.Linq;
    using System.Drawing;

    namespace FastReport
    {
    public class ReportScript
    {

    private void Table1_ManualBuild(object sender, EventArgs e)
    {

    DataSourceBase datas = Report.GetDataSource(&quot;DataTable&quot;);
    datas.Init();

    int colCount = datas.Columns.Count;

    Table1.PrintRow(0);
    for (int i = colCount; i &lt; colCount; i++)
    {
    Cell1.Text = datas.Columns[i].Alias;
    Table1.PrintColumn(0);
    }

    while (datas.HasMoreRows)
    {
    Table1.PrintRow(1);
    for (int i = 0; i &lt; colCount; i++)
    {
    Cell2.Text = datas[datas.Columns[i]].ToString();
    Table1.PrintColumn(0);
    }
    datas.Next();
    }


    Table1.Width=Page1.Width;
    }



    }
    }
    </ScriptText>
    <Dictionary/>
    <ReportPage Name="Page1" Watermark.Font="宋体, 60pt" UnlimitedWidth="true">
    <DataBand Name="Data1" Width="718.2" Height="151.2" Cursor="No">
    <TableObject Name="Table1" Width="85.05" Height="45.35" ManualBuildEvent="Table1_ManualBuild">
    <TableColumn Name="Column1" Width="85.05"/>
    <TableRow Name="Row1" Height="21.73">
    <TableCell Name="Cell1" Font="宋体, 9pt"/>
    </TableRow>
    <TableRow Name="Row2" Height="23.62">
    <TableCell Name="Cell2" Font="宋体, 9pt"/>
    </TableRow>
    </TableObject>
    </DataBand>
    <PageFooterBand Name="PageFooter1" Top="155.2" Width="718.2" Height="18.9"/>
    </ReportPage>
    </Report>

  • 相关阅读:
    c++中函数参数传递(值传递、指针传递,引用传递)进一步认识
    时间比金钱金贵得多
    Difference between menu item types; Display, Output and Action in Dynamics Ax
    测试员,敢问路在何方
    C++中++i与i++
    C++中int转string与string转int
    美文共赏
    关于未来十年的思考
    T-SQL_面试题
    [eBook]Inside Microsoft Dynamics AX 2012 R3发布
  • 原文地址:https://www.cnblogs.com/NikkiLiu/p/13203132.html
Copyright © 2011-2022 走看看