clearing search criteria
I have a report with a subreport and 2 queries in the datapipeline. I need
to clear all of the search criteria and write my own search criteria at
runtime. I do not need to change entire sql, just search criteria.
I have looked at help extensively and I can use the following code. The
problem is that it only clears the first query of the pipline and not the
second. Basically I need to know what functions to call to clear all search
criteria (including begin / end /or) and what function to use to rewrite the
same.
Currently using:
lSQLBuilder := TdaSQLBuilder.Create(ppReport1.DataPipeline);
lSQLBuilder.SearchCriteria.Clear;
lSQLBuilder.SearchCriteria.AddAutoSearch('Journals', 'Account', '=',
editAccount.Text);
lSQLBuilder.ApplyUpdates;
This only clears search criteria of the first, not second. I must be able
to clear search criteria of both queries and must clear begins, ends, and
Or.
Thanks for your help.
to clear all of the search criteria and write my own search criteria at
runtime. I do not need to change entire sql, just search criteria.
I have looked at help extensively and I can use the following code. The
problem is that it only clears the first query of the pipline and not the
second. Basically I need to know what functions to call to clear all search
criteria (including begin / end /or) and what function to use to rewrite the
same.
Currently using:
lSQLBuilder := TdaSQLBuilder.Create(ppReport1.DataPipeline);
lSQLBuilder.SearchCriteria.Clear;
lSQLBuilder.SearchCriteria.AddAutoSearch('Journals', 'Account', '=',
editAccount.Text);
lSQLBuilder.ApplyUpdates;
This only clears search criteria of the first, not second. I must be able
to clear search criteria of both queries and must clear begins, ends, and
Or.
Thanks for your help.
This discussion has been closed.
Comments
Well, I don't use the TdaSQLBuilder, but if your code is correct, the
following should work for the detail dataview:
lSQLBuilder := TdaSQLBuilder.Create(ppSubReport1.DataPipeline)
HTH,
Edward Dressel
Team DM
as ability to evaluate the filters, etc. Perhaps you can post sample code?
Thanks,
Bob
Ed is correct, there can only be one query (dataset) per datapipeline in
ReportBuilder. If you need to clear two separate queries (each connected to
their own pipeline) you will need to create two TdaSQLBuilder objects. Note
that Ed's example creates a new TdaSQLBuilder for the pipeline connected to
a subreport which would be one way of accessing a second pipeline.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com