I have a report that is rather large and I am trying to produce PDFs based on various record filters that affect more than one field.
I designed the report so that it returns all the records and open it using the ras/com models in an asp page. I can get the filter to apply for the first criteria but when I modify the filter again it returns with no records in the report, almost as if it *added* the filter to the exitsing one instead of replacing it.
Here is the filter code:
dim filter
Set filter = clientDoc.DataDefinition.RecordFilter.clone(true)
'loop through rs to get each PMs initials to filter the report
while not rs.eof
filter.FreeEditingText="trim({sp_Projects_w_Workelements_and_SpendPlans;1.PM})=""" & rs.fields("initials".value & """"
clientDoc.DataDefController.RecordFilterController.modify filter
call clientDoc.PrintOutputController.Export(5).Save("c:\mycustomer\projects\pm\" & rs.fields("initials".value & ".pdf", True)
rs.movenext
wend
Interestingly enough this same code works if I filter on the groups but I have report totals that still showed the entire report's totals when displaying just the one group's effected by the filter.
I've looked at clientDoc.DataDefinition.RecordFilter.FreeEditingText after modifying the filter and it still contains the text. The docs state that if the text is parsed into the filteritems collection correctly this property will be blank but again the first filter works
Since I am going to use this same code in the asp page to filter different fields I do not think using paramters will work for me.
I have also tried opening the report and logging in to the db for each criteria (the report has saved data) for each criteria which works but takes a very very long time to run.
any ideas?
Thanks in advance,
Jeff Becker
beckerj@bellatlantic.net
I designed the report so that it returns all the records and open it using the ras/com models in an asp page. I can get the filter to apply for the first criteria but when I modify the filter again it returns with no records in the report, almost as if it *added* the filter to the exitsing one instead of replacing it.
Here is the filter code:
dim filter
Set filter = clientDoc.DataDefinition.RecordFilter.clone(true)
'loop through rs to get each PMs initials to filter the report
while not rs.eof
filter.FreeEditingText="trim({sp_Projects_w_Workelements_and_SpendPlans;1.PM})=""" & rs.fields("initials".value & """"
clientDoc.DataDefController.RecordFilterController.modify filter
call clientDoc.PrintOutputController.Export(5).Save("c:\mycustomer\projects\pm\" & rs.fields("initials".value & ".pdf", True)
rs.movenext
wend
Interestingly enough this same code works if I filter on the groups but I have report totals that still showed the entire report's totals when displaying just the one group's effected by the filter.
I've looked at clientDoc.DataDefinition.RecordFilter.FreeEditingText after modifying the filter and it still contains the text. The docs state that if the text is parsed into the filteritems collection correctly this property will be blank but again the first filter works
Since I am going to use this same code in the asp page to filter different fields I do not think using paramters will work for me.
I have also tried opening the report and logging in to the db for each criteria (the report has saved data) for each criteria which works but takes a very very long time to run.
any ideas?
Thanks in advance,
Jeff Becker
beckerj@bellatlantic.net