【问题标题】:Fastreport error in report of multiples reports多重报告报告中的快速报告错误
【发布时间】:2020-11-12 15:15:13
【问题描述】:

我创建了一个包含多个报告的报告。 在查询中,我将宏用于 where 子句。

select * from tbl1 where &conditions order by id

个人报告工作正常。 报告正确运行。当我想用语句创建多报表时,有时会出现问题。

frxReport1.LoadFromFile('report.fr3');
frxReport1.PrepareReport(False);

在 PrepareReport 中通知

SQL 错误...令牌未知 ORDER

。 Order对应SQL“order by”。

看到 FDMonitor 缺少宏。

select * from tbl1 where order by id

ResourceOptions.MacroCreate 和 MacroExpand 设置为 True。

所有嵌入式报告(至少 10 个)都包含宏。有些被正确添加到多报告中,有些则没有。为什么?

我正在使用 Delphi 10.3 和 Fastreport 6.8 Enterprise 我等cmets

【问题讨论】:

    标签: sql delphi macros fastreport


    【解决方案1】:

    有时需要同时打印一组报告或在一个预览窗口中显示。

    FastReport 可以在已构建的报表末尾添加第二个报表。 TfrxReport.PrepareReport 方法有一个可选的ClearLastReport 布尔参数,默认为True。此参数在True 时会清除之前生成的报告的输出。

    以下 Pascal 代码显示了如何构建包含两个报告的批次:

    frxReport1.LoadFromFile('1.fr3');
    frxReport1.PrepareReport;
    frxReport1.LoadFromFile('2.fr3');
    frxReport1.PrepareReport(False);
    frxReport1.ShowPreparedReport;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-28
      • 1970-01-01
      相关资源
      最近更新 更多