How to default a SSRS report to PRINT PREVIEW

6.3k views Asked by At

I am converting access reports to SSRS reports for a client application. The Clients requirement is, when they open a SSRS report, it should by default open with Print Preview. I am unable to find a property in SSRS which sets it. Any suggestions? or any help? Please!

1

There are 1 answers

0
djangojazz On BEST ANSWER

Nope, but I have to assume you mean when they open the 'ReportViewer' that they can immiediately see the option to save the file. However.... SSRS has some pretty cool features built into it that you can do depending on access rights and levels.

  1. You can give a user a rest URI that can set a 'format' to render to and thus give them the report in that format. Good for Excel and PDF junkies. It works like this: ( ENSURE you understand that the landing page for SSRS is usually Reports and the SERVICE is usually ReportServer)

    http:// (servername)/ReportServer/Pages/ReportViewer.aspx?%2f(directoryName)%2f(reportName)&rs:Command=Render&rs:Format=PDF
    

    The rest URI on SSRS's service is pretty cool as you can put parameters in, set rendering options, and choose other options.

  2. Expanding on 1 if your client needs something on a custom viewer, you can consume an SSRS web service in a form object in HTML like so:

    <form id="frmRender" action="http:// (servername)/(pathtoreport)" method="post" 
    target="_self">
    <H3>My Report Title</H3>
    Render in the following format:<br/>
    <Select ID="rs:Format" Name="rs.Format" size=1>
    <Option Value="HTML4.0">HTML 4.0</Option>
    <Option Value="PDF">PDF Format</Option>
    </Select>
    </form>
    

    This would give a person that can't take the extra second to hit print preview to only be offered two choices of either HTML or PDF

  3. Still not enough? Well you can extract out the SSRS service to a local C# or VB.NET class proxy object and then build a custom .NET interface for a client to build the reports yourself in binary formats. I have done this for custom interaction in existing services that when an event happens a report needs to go out. Be aware this process is pretty time consuming so I would suggest parts 1 and 2 unless you want to dive deep into RDL language code. If so I would read this other thread on diving deeper: Programmatically Export SSRS report from sharepoint using ReportService2010.asmx