Posted 8 July 2019, 5:15 am EST
Hello,
We recently upgraded from Active Reports 10 to Active Reports 13.1. I noticed one of our reports was taking a lot longer to complete after the update (from a couple of seconds to now taking 20-30 or longer). In this particular report, I am setting some report parameters in our program at runtime. I have found that each time I access the Parameters object, the stored procedure that is in the report is being called. The problem is, all parameters are blank or null at this time so the procedure ends up returning a large data set. Is there anyway to prevent the procedure from being executed? I just want to access the parameters in the report file and set the values so when the report runs the parameters will be set. I don’t believe this occurred in ActiveReports 10 otherwise the report would have been slow in that release. Below is a sample of what I’m doing. I load the file definition, create the PageDocument object, and set parameters. Each time the runTime.Parameters is hit, the stored procedure executes. Even when the ‘runtime.Parameters.Contains’ is hit, the procedure is exectued. Any assistance would be greatly appreciated.
GrapeCity.ActiveReports.PageReport def = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(filePath);
GrapeCity.ActiveReports.Document.PageDocument runTime = new GrapeCity.ActiveReports.Document.PageDocument(def);
if (runTime.Parameters.Contains(“StartValue”))
runTime.Parameters[“StartValue”].CurrentValue = “XXX”;
Thanks!
Richard