Access system variables from delphi unit.

edited July 2014 in FastReport 4.0
I have figured out how to access variables I have added, but I'd like to access the System variables from my project (not within the report). Is this possible?

<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->
...
var
i: integer;
...
frxrRelease.PrepareReport(TRUE); // this is set to doublepass...
i := frxrRelease.Variables.IndexOf('TotalPages');
showmessage( string(frxrRelease.Variables.Items.Value) );
...
<!--fontc--></span><!--/fontc-->


This returns A/V with a -1 for i. It seems to work for variables I have created, just not the System variables.

Thanks,

michael

SCRATCH. Found it after just a little more:

<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->
showmessage(inttostr(frxrRelease.Engine.TotalPages));
<!--fontc--></span><!--/fontc-->

I am guessing the others are in there somewhere also?

Thanks again,

michael.

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.