question

xyz avatar image
xyz asked

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??

ssrsexcelreportingdynamic
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image
Fatherjack answered

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

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

CNewton1 avatar image
CNewton1 answered
Please check this [flash video demo][1] [1]: http://www.fast-report.com/en/products/frnet-flash-demo.html
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pavel Pawlowski avatar image
Pavel Pawlowski answered
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.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.