TppReport.CreateAutoSearchCriteria() and Empty Expression
in DADE
Hello,
I ve got a problem when I want to programmatically insert Search Criteria in my report.
All works very well except one particular case, when I want to filter data on a empty field.
I create a criteria with the fieldname, the operator type is Equal and I let the expression value empty.
I call TppReport.CreateAutoSearchCriteria() with these parameter
The resultd inside the report is not correct, data are not displayed, they should.
When I insert the same criterias inside the report from the report editor, it works !
Is there any thing I miss ?
Thanks for your answer !
Best regards
David.
I ve got a problem when I want to programmatically insert Search Criteria in my report.
All works very well except one particular case, when I want to filter data on a empty field.
I create a criteria with the fieldname, the operator type is Equal and I let the expression value empty.
I call TppReport.CreateAutoSearchCriteria() with these parameter
The resultd inside the report is not correct, data are not displayed, they should.
When I insert the same criterias inside the report from the report editor, it works !
Is there any thing I miss ?
Thanks for your answer !
Best regards
David.
Comments
Try using the soBlank type to check for an empty field rather than a blank string. In my testing with the End-User AutoSearch example, this functioned correctly. Something like the following:
ppReport1.CreateAutoSearchCriteria('MyPipeline', 'MyFieldName', soBlank, '', False);
Moving forward, you should consider using Report Parameters to set up and customize autosearch criteria. This is the new/easier way of performing this task in ReportBuilder.
http://rbwiki.digital-metaphors.com/end-user/fundamentals-end-user/report-parameter-fundamentals/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com