Missing PAGE# & TOTALPAGES

......and yes, Two-Pass report is selected.

In the page header I have a memo containing the following text:

Page: [PAGE#]/[TOTALPAGES], Created: [DATE] [TIME]

and when the report is executed I get:

Page: / , Created


This used to work, but I have now changed the way I prepare and run the reports. Here's what I do:

1. Design the reports with 'Two-Pass report' ticked.
2. Store report in a database.
3. I assign different datasets to the TfrDBDataSet according to who/what calls the report. e.g.

frDBDataSet->RangeBegin = (bCurRow) ? rbCurrent : rbFirst;
frDBDataSet->RangeEnd = (bCurRow) ? reCurrent : reLast;
frDBDataSet->OpenDataSource = false;

frDBDataSet->DataSet = pDS;
frDBDataSet->Init();
frReport->Dataset = frDBDataSet;

if ( LoadReport( sReportName, frReport ))
{
if ( frReport->PrepareReport() )
{


Is it likely that this is removing the 'Two-pass report' value? If so, how would I set it programmatically.

Note that my program (not FR) opens and closes the dataset..

On a related note. In the page header, I also have a memo containing [TITLE]. I'm sure I used to fill this in OnGetValue, but now it doesn't get called, so I get [TITLE] on my report. Any ideas on this?

TIA

David

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:48AM
    hi
    if your memo is displaying "[TITLE]" you may have inadvertently set the textonly property of the memo at design time.
    I don't see anything in your code that would change your report options
    what you might try to dblcheck instead of calling prepare report
    temporarily call design report and see if the option has been changed.
    regards ;)
  • edited June 2004
    Gord

    ;) In OnGetValue I had:

    if ( ParValue.IsEmpty() )
    ParValue = " ";

    Why did I put this in? I seem to remember, FR giving an exception when it couldn't find a variable, so I thought that adding this catch-all statement would fix it..... Since I was supplying a value for PAGE# + TOTALPAGES, FR didn't look in the system vars/dictionary.

    doh.


    RE: [TITLE] - I've found the problem with this and it's too embarrasing to detail the problem, so I'll keep quiet. ;)

    David

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.