Solved

Auto-Numbering in SSRS

Posted on 2013-01-24
2
531 Views
Last Modified: 2013-01-25
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?
0
Comment
Question by:December2000
2 Comments
 
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 250 total points
Comment Utility
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.
Jim
0
 
LVL 11

Accepted Solution

by:
Simone B earned 250 total points
Comment Utility
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'
GROUP BY b.Name

If you have more than one report with the same name, you could use Path instead of Name for uniqueness.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now