Forcing newpage on Reportsummary clears summary

edited 12:06PM in FastReport 4.0
To make the reportsummary to be printed on the bottom of the report I've learnt to do like 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

  • edited 12:06PM
    I have to replay to myself - no one have even read this!
    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. >
  • gordkgordk St.Catherines On. Canada.
    edited 12:06PM
    when you force a new page in the summary band you will lose the data because you are already past the eof of the data set
    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
  • edited 12:06PM
    gordk wrote: »
    when you force a new page in the summary band you will lose the data because you are already past the eof of the data set
    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
    How can I do that?

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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.