• 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>

  • 相关阅读:
    我告诉你 电脑软件工具
    mysql 查询当天、本周,本月,上一个月的数据
    springboot:springboot+mybatis多数据源最简解决方案
    MySQL数据库优化的(经典必看)
    MyBatis 的强大特性之一便是它的动态 SQL之常用属性使用
    你知道Spring 中使用了哪些设计模式?
    kafka 相关面试问题
    掌握TCP/IP的通信原理(三次握手、四次挥手)。
    jsp和servlet实现文件的上传和下载
    Java获取数据库记录通过javabean映射,并存入list集合
  • 原文地址:https://www.cnblogs.com/NikkiLiu/p/13203132.html
Copyright © 2020-2023  润新知