Solved

Auto-Numbering in SSRS

Posted on 2013-01-24
2
544 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

734 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