Passing criteria question
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
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
This discussion has been closed.
Comments
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
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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