Total Pages in System Variables?

BoskoBosko Belgrade, Serbia
edited 7:35PM in FastReport .NET
Hi Alex,

I cannot get this value printed, it always prints 0 pages as number of Total Pages.

Is there some additional property that should be set, or this System Variable not working as I expected?

It would be nice if we could put that TotalPages to print something like "Page 2 of 6", but it always prints "Page 2 of 0".

Another question for FooterBand:
I have a FooterBand after DataBend, it works just fine for me, exactly what I needed, but, I need to print something else on one of TextBoxes in FooterBand on Last Page of a report.

So I tried to set a property "PrintOn", and exclude "Last Page", so I could print values on ReportSummaryBand, but it prints it again on Last Page.

I also tried to check if current page is actually last page of a report, but it failed, as I said, TotalPages variable, always returns 0;
private void TextThatSholdBeSomethingElseOnLastPage_BeforePrint(object sender, EventArgs e)
    {
       if(((Int32)Report.GetVariableValue("Page"))==((Int32)Report.GetVariableValue("TotalPages")))
          TextThatSholdBeSomethingElseOnLastPage.Text = "Summary";
    }

Anyway, I need to replace default text for TextObject (that repeats on every page in FooterBand with some value) on a Last Page of a report?
For example:
I put TextObject on a FooterBand, with value of "Transfer", it prints it well on every page, but on last page of the report, printer TextObject's value should be "Summary".
Please, help somehow?

Thanks in advanced!

Comments

  • edited 7:35PM
    Hi Bosko,

    You need to set your report to double pass (menu "Report|Options...", "Double pass" checkbox). It will solve both problems (TotalPages and PrintOn).
  • BoskoBosko Belgrade, Serbia
    edited 7:35PM
    AlexTZ wrote: »
    Hi Bosko,

    You need to set your report to double pass (menu "Report|Options...", "Double pass" checkbox). It will solve both problems (TotalPages and PrintOn).


    Thank you, Alex, it solved both problems! [img]style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I didn't know about "DoublePass" property. Now report is exactly as it should be! Thank you![/img]

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.