Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Passing criteria question

edited July 2004 in General
Hi,

I have the following in the OnBeforePrint of a report (ppReport1):

ppReport1.FreeAutoSearchFields;
thisFld := ppReport1.CreateAutoSearchCriteria('email', printEmailStr,
soEqual, inttostr(SingleRecNo), False);

It doesn't produce any results which makes me think it is somehow producing
a resultset of zero but i can't be sure. Are there any other settings
require in ppReport component or elsewhere that needs to be set before you
are able to free fields and create autosearch criteria? I have had this
working before, but of course cant find what broke it.

Regards

Alex

Comments

  • edited July 2004
    Seems to be more to this. I don't think it is the criteria search anymore.
    I have deleted out the code mentioned below and created an end-user report
    with just a label in the header and detail lines. In the end-user facility
    it displays the report fine, however, using the following code I only get a
    blank page:

    ppReportExplorer1.LoadReport(selEmailName,folderID);
    ppReport1.Print;

    Any ideas where the problem may be occurring?

    Thanks

    Alex

  • edited July 2004
    Hi Alex,

    It looks like the Report.BeforePrint event fires too late to create a new
    AutoSearchField and have it utilized in that report. You might try using
    the Report.GetAutoSearchValues or Report.BeforeAutoSearchDialogCreate events
    as an alternative.

    Which version of ReportBuilder are you using? In my testing with the code
    below, it seems to work correctly with one of our demo applications.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    H Nico,

    I have sent an email to support. Can you reply to that as I have provided
    more information on this?

    PS I have RB 6.03

    Regards

    Alex

This discussion has been closed.