I have a somewhat large report (v10, +600k with data saved) that I would like to open using RAS (v10 embedded Enterprise) and produce PDFs by filtering on one of 4 different fields.
I have something that works but it takes a considerable amount of time to run (over 2 hrs.) but when I apply the filters (record not group) in the report designer they appear to run much quicker
To open the "whole" report and refresh the rowsetcontroller takes about 6 minutes. I have the report options set to save the data with the report and I have created bursting indexes on the four fields I want to filter by.
I open the ReportClientDocument and call the DatabaseController.logon method. I then have four parameters set up two of which are passed to a M$ SQL Server storedprocedure and the other two are only used to display a report title.
I then apply a filter:
Set filter = clientDoc.DataDefinition.GroupFilter.clone(true)
filter.FreeEditingText="trim({sp_Projects_w_Workelements_and_SpendPlans;1.DE}) like """ & v(0,i) & """"
Finally, I apply the filter and export to the PDF.
clientDoc.DataDefController.RecordFilterController.modify filter
call clientDoc.PrintOutputController.Export(5).Save("c:\inetpub\ & replace(v(0,i),"*","_") & ".pdf", True)
The two areas where I think the delays are occuring are as follows.
1.) I read that changing parameters causes the report to refresh. The only paramters that are changing are the report titles which are not used to retrieve any data but I did try removing them and it was still just as slow.
2.) I found that I have to close the document each time after I apply the filter in order to apply a new filter. This is most likely the cause of the problem but when I apply the filter a second time without closing the doc it acts as if it's adding the criteria to the existing instead of replacing it or when I export it is saving the data with the report in it's filtered state. In either case I never explicitly call the save method of the clientdoc.
Any help would be greatly appreciated!
Jeff Becker
BeckerJ@bellatlantic.net
I have something that works but it takes a considerable amount of time to run (over 2 hrs.) but when I apply the filters (record not group) in the report designer they appear to run much quicker
To open the "whole" report and refresh the rowsetcontroller takes about 6 minutes. I have the report options set to save the data with the report and I have created bursting indexes on the four fields I want to filter by.
I open the ReportClientDocument and call the DatabaseController.logon method. I then have four parameters set up two of which are passed to a M$ SQL Server storedprocedure and the other two are only used to display a report title.
I then apply a filter:
Set filter = clientDoc.DataDefinition.GroupFilter.clone(true)
filter.FreeEditingText="trim({sp_Projects_w_Workelements_and_SpendPlans;1.DE}) like """ & v(0,i) & """"
Finally, I apply the filter and export to the PDF.
clientDoc.DataDefController.RecordFilterController.modify filter
call clientDoc.PrintOutputController.Export(5).Save("c:\inetpub\ & replace(v(0,i),"*","_") & ".pdf", True)
The two areas where I think the delays are occuring are as follows.
1.) I read that changing parameters causes the report to refresh. The only paramters that are changing are the report titles which are not used to retrieve any data but I did try removing them and it was still just as slow.
2.) I found that I have to close the document each time after I apply the filter in order to apply a new filter. This is most likely the cause of the problem but when I apply the filter a second time without closing the doc it acts as if it's adding the criteria to the existing instead of replacing it or when I export it is saving the data with the report in it's filtered state. In either case I never explicitly call the save method of the clientdoc.
Any help would be greatly appreciated!
Jeff Becker
BeckerJ@bellatlantic.net