Solved

Auto-Numbering in SSRS

Posted on 2013-01-24
2
537 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
ID: 38816386
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
ID: 38816521
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DTS Connection Failed 7 68
Query Optimization 14 43
SSIS with VPN COnnection 2 74
T-SQL: New to using transactions 9 25
Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

770 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