Friday, February 24, 2012

Extracting the parameter values

I have a report application where I am using Microsoft AxBrowser and url acess to view the reports. I have a report with multivalued parameter. I need to extract the user selected parameter value for that rpeort for some other purpose. How to extract the parameter value?

Please help

Do you have access to the cookies collection of the AxBrowser control? If so, then you can try to get the RS session ID and call the SOAP API GetExecutionInfo() on that session. It will return the effective parameters for the current session. Assuming you haven't changed them then it should be the parameters that were used to render the report.

Question: Why aren't you using the viewer control?

|||Thanks for the reply John.
I am passing the default parameters to the report and getting it.
I needed to extract the parameter values when the user inputs (selects) some other value.
I could able to retrieve the parameter values by capturing the url after navigation and used some string functions. I used the Navigate2 event of AXBroweser. This works for me becuase I had to extract values for only two reports and I know the names of the parameters
we have SQL2000 and Reporting Services2000. I guess we can use report viewr control only with Reporting Services 2005. Correct me if I am wrong.
Thanks,
Siri..
|||

Yes the viewer control only works with the 2005 endpoints.

Your solution will only work in the case where parameters are passed on the URL string, which in general is not the case. I would recommend trying to get the sessionId from the AxBrowser and calling GetExecutionInfo() as it should work regardless of how the parameters are set.

No comments:

Post a Comment