Dynamic Report creation in ssrs

I want to pass the excel file name in a text box and then want to create a report from the data available in that file.What i want is to create the report dynamically according to the file name in textbox.How can i do it??

more ▼

asked Apr 20, 2010 at 02:36 AM in Default

avatar image

1 2 2 2

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

It is possible to build a report that takes a parameter value to construct all or part of a datasource. If it is only the filename that is changing then it will be one parameter, if more details are different then you will need a parameter for each difference. You wont be able to control the error handling very well so your users could get ugly error messages if they provide a value that isnt valid. This is a good start for you http://msdn.microsoft.com/en-us/library/z72eefad.aspx

more ▼

answered Apr 20, 2010 at 03:45 AM

avatar image

Fatherjack ♦♦
43.8k 79 101 118

(comments are locked)
10|1200 characters needed characters left

Please check this flash video demo

more ▼

answered Oct 06, 2011 at 11:55 AM

avatar image


(comments are locked)
10|1200 characters needed characters left

You can add a new DataSource to the report where it will use ODBC Driver. Then at least in SSRS 2008R2 you can define the ODBC connection string for the excel file as an expression utilizing an parameter containing the path to the excel file.

Then you can build your datasets reading from the excel.

However you have to take in mind, that the select should always return the same columns, so the excel files should have the same structure.

Another note is, that the expression in data source can be evaluated only during runtime, so for design time, you have to put a fixed ODBC connection string and once you want to test the dynamic behavior, you put the expression for connection string.

more ▼

answered Oct 06, 2011 at 02:45 PM

avatar image

Pavel Pawlowski
22.7k 10 15 26

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Apr 20, 2010 at 02:36 AM

Seen: 3410 times

Last Updated: Apr 20, 2010 at 06:59 AM

Copyright 2018 Redgate Software. Privacy Policy