Auto-Numbering in SSRS

Hi Experts!

I have a report and I want it auto-numbered each time a report is created. Would I need a column in a table to that? Could the report form number be at the report level?
Who is Participating?
Simone BConnect With a Mentor Senior E-Commerce AnalystCommented:
The information you're looking for is in the ReportServer database:

SELECT B.Name, COUNT(A.TimeStart) FROM ExecutionLog A
INNER JOIN [Catalog] B ON A.ReportID = b.ItemID
WHERE b.Name = 'YourReportNameHere'

If you have more than one report with the same name, you could use Path instead of Name for uniqueness.
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
My guess is the only way you'd be able to pull this off is something like...

(1)  Have as one of your data sets a stored proc that returns a version_number
(2)  Create a table somewhere that holds the number of times the report has been run.
       { an excellent start for logging report metrics btw }
(3)  Have the SP extract the above'number of times the report has been run', UPDATE it to incriment it by one, then return the extracted number in the SP.
(4)  Have a textbox somewhere who's data set is the SP's return value.

Good luck.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.