Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extremely Difficult Question regarding Crystal and ASP/.NET

Status
Not open for further replies.

ciscowiz

MIS
Apr 21, 2004
146
US
If anyone could help me with this I would be not only greatful but surprised. I am using ASP.NET to load and view reports with the reportdocument component, ie. crReport.load(Path). Once the report is loaded, you can use the debugger to view the report's information including its datadefinition. Within that is the parameterfields collection. Within that is a property called "count" which is supposed to represent the total count of the report's parameters. This is where the problem is.

My report has one parameter. However, the count says I have two. It turns out it also counts the selection formula of the report's subreport as a parameter. You dont even need to pass it a value and the report will still run as it should, it does not need to be counted as a parameter. However, I use a page to display the report's parameters and in my code I loop through the datadefinition.parameterfields.count to add controls based on the parameter. Obviously it is adding a control for the subreport and it shouldnt seeing as that isnt a parameter. Also, if I load a report with let's say 3 parameters, but I am only using 2 of them in the report, the other one may have been used before, but it isnt needed anymore, the parameterfields.count will show 3. This isnt too much of an issue, I can always go into the report and delete the parameters I don't need. It seems like if you figure out how to filter out the selection formula from the parameterfields collection you might know how to filter out parameters not used. Maybe compare it to selection formula? I don't know, I am still pretty new to ASP but any help would be appreciated.
Thanks,
Bryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top