【问题标题】:How send 3 Datatable to StimulSoft如何将 3 个数据表发送到 StimulSoft
【发布时间】:2023-01-31 17:11:05
【问题描述】:

我如何将 3 个数据表发送到 winforms c# 中的 StimulSoft 报告。 我在 StimulSoft 报告中添加了数据集和 3 个数据表。 我在应用程序中输入:

StiReport report = new StiReport();
string fileReport = "Report\\ReportTest.mrt";
string myfile = System.AppDomain.CurrentDomain.BaseDirectory + fileReport;
report.Load(myfile);
report.Compile();
report.RegData(dtDelay);
report.RegData(dtDesc);
report.RegData(dtPart);
report.Show();

Sample App

【问题讨论】:

  • 也许您可以尝试添加 DataSet 对象而不是 DataTable。检查this。您可以将 DataTable(s) 保留在该 DataSet 中,并尝试使用该对象生成报告。
  • 我是初学者。在此链接中,它表示您应该将文件 xml 发送到报告。如何将多数据表转换为 xml?
  • 检查this
  • 我测试了那个链接的方法,但是我的问题没有解决。我没有合并表,因为每个表的列数和行数不相等
  • 我可以在您的 SampleApp 中看到,按钮 2 正在执行我认为您想要的操作。所有三个表格都在一页中。您是否正在考虑为所有数据表创建一个新页面?

标签: c# winforms datatable report stimulsoft


【解决方案1】:

请在这篇文章中使用我的方法:

Customiz (or Create) a table(StiTable) at runtime in C# (.NET4)

您可以根据需要多次调用此方法。 请注意,您可以调整方法并从代码中获取表名或视图并使其成为动态的,之后您可以根据需要创建任意数量的表。使用 comlie() 方法之前的方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-14
    • 1970-01-01
    • 2017-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多