Forcing newpage on Reportsummary clears summary
To make the reportsummary to be printed on the bottom of the report I've learnt to do like this:
But when Engine.NewPage is executed summary functions returns blanks on the report.
The summary is built from the detaildataband like: ( [COUNT(DetailData1,2)] ).
if I remove the newpage command the summary works again but the report wont look nice.
Is there a solution to this?
var
offset: extended;
begin
offset := Engine.FreeSpace - ReportSummary1.Height - Child7.Height -1;
if offset < 0 then begin
Engine.newPage;
offset := Engine.FreeSpace - ReportSummary1.Height - Child7.Height -1;
end;
Engine.CurY := Engine.CurY + offset;
But when Engine.NewPage is executed summary functions returns blanks on the report.
The summary is built from the detaildataband like: ( [COUNT(DetailData1,2)] ).
if I remove the newpage command the summary works again but the report wont look nice.
Is there a solution to this?
Comments
Is my problem of no interest?
To me it's a big problem as it ia an issue on almost every report.
Please someone, there must be a solution or at least it would be worth a comment.
store the values in a variable at a point where they are available to you ie detail footer and use the variables in the summary band memos
I created a variable in the Report-Variables-window. I set the expression for the variable from a field in the dataset.
Ok, I can now store this variable on different places and it will display the value of the field for actual record but in the ReportSummary I don't now how to get a sum of these records. It just display a value from one of the records.
I added a Footer connected to the detailband and added the variable there but I have tried different ways to get a sum but it will not work for me.
I suppose I've no idea of how to use variables in this way.
The only way I know is to create the summation in a script in the code-tab.