views:

435

answers:

2

Hi, I am generating a report that contains the version number. The version number is stored in the DB and retrieved/incremented as part of the report generation.

The only problem is, I am calling SSRS via a web service call, which returns the generated report as a byte array.

Is there any way to get the version number out of this generated report? For example to display a dialog that says "You generated Status Report, Version number 3". I tried passing in an output parameter and setting it inside the storedproc. Its modified when i execute it in sql management studio, but not in the reporting studio. Or atleast i can't seem to bind to the modified, post execution value (using expression "=Parameters!ReportVersion.Value").

Of course, I could get/increment the version number from database myself before calling the SSRS webservice and pass it along as a parameter to the Report, but that might cause concurrancy problems.

On the whole, it just seems neater for the storedproc to access/generate a version number and return it to the ReportingEngine, which will generate the report with the version number and return the updated version number to the WebService client.

Any thoughts/Ideas?

A: 

Since I can't add a comment yet...

Just throwing this out. Maybe render the report as XML(to a XML document object) and pull your version number out via XQuery or XPath.

Of course that would probably bugger up your whole "versioning" scheme as you would be rendering the report twice. Perhaps add a parameter that indicates whether or not to increment your version number?

Mozy
A: 

Hi,

As a workaround, you could create a sub-report to do this. Instead of returning the version as an output variable, return it as a column in a resultset.

Hope this helps,

Bill

Bill Mueller