Link to home
Start Free TrialLog in
Avatar of SimonJohnG
SimonJohnG

asked on

SQL Report builder direct to Excel

I would like to generate a report in SQL server reporting services that allows the user to select either a drop down or tick box so they make make the decision to export the report to CSV format prior to running the report and not rendering it to the screen.

Presently they make date selections then run the report then perform the export, my goal is to make these selection then make a choice to either show to screen or direct to excel either by it automaticaly opening excel and placing the data or if this is not possible saving it to a shared area on a server as a CSV file.
Avatar of ValentinoV
ValentinoV
Flag of Belgium image

You'd of course be able to achieve that using a custom .NET application. But in case that's a bit too far, there may be another option.

The Report Server URL allows you to specify the output format.  To export to CSV, add the following to a URL that would normally open a report:

&rs:Format=CSV

For Excel, replace CSV with EXCEL. See here for a full list: Hide/Show Items Dependant On Export Format (SSRS)

Using that knowledge, you could build a main report that serves the date parameters to the user. This report would then contain a URL as explained earlier. That URL would be located in the Action > Go To URL setting on a textbox.  Put some text in the textbox so that the users know they're clicking a link or a button (use some coloring to make it look like a link or button).

I hope the above is clear, if not let me know...

See also: Export a Report Using URL Access
Avatar of SimonJohnG
SimonJohnG

ASKER

Would your solution bring up the textbox after the report had originally been executed? I had hoped the user would enter the required date then click on the 'text' button and this would generate the CSV without if first appearing on screen. If this is the case the user could just click on the export menu item?

Maybe I read you wrong?
ASKER CERTIFIED SOLUTION
Avatar of ValentinoV
ValentinoV
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial