callinng SSRS Reports using query

  • I have created testreport.rdl using SQL Server 2012 SSRS. How to execute/call this through SQL query analyser, so that this will be executed and display output.

    Thanks in advance

  • This isn't really the way SSRS is designed to work. There are a couple of ways you could possibly do it, but I haven't tried, nor would I recommend either. You could write a CLR procedure that would have to be UNSAFE that calls the SSRS web service to return the report data, or you could use xp_cmdshell to call a .NET application that would render the report.

    SSRS reports are designed to be called through the report manager interface or in a client application that calls the web services to render the data in the desired format.

  • We have added a step to run after the SQL is run to build the needed input table to the SSRS report. This call to a bat file will execute the report and save it in the format and location you want it.

    I believe the base code for this is from Microsoft, SGLReportGen.rss is what the bat file uses to do this. We just pass the server the SSRS is stored on, the location and name of the output file you want, the name of the SSRS and the type of report to generate(PDF, Excel, ...).

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply