开发者

FastReport: Summary on ReportTitle

I have a report with these parts:

ReportTitle

ColumnHeader

MasterData

ColumnFooter

ReportSummary

How can I display sum of a field in MasterDat开发者_运维百科a on ReportTitle?


I can see two possible ways:

  • Via a report variable:

    1. Calculate the total separately.

    2. Pass the total to the report using a report variable (and, possibly, the TfrxReport.OnGetValue event).

  • Via the DoublePass property of the report:

    1. Set the TfrxReport.EngineOptions.DoublePass property to True.

    2. Calculate the total in the report script and store it to a script variable on the first pass

    3. Fill the memo from the variable on the second pass.

    Use Engine.FinalPass in the script to detect whether it's the final (second) pass.


  1. Define a variable for sumatory
  2. Asign sumatory to variable on first pass of report
  3. Show variable on second pass

Or, if the sumatory is result of a query, get this result and show it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜