Search code examples
javascriptsql-servervisual-studio-2013lightswitch-2013

Passing a parameter within a URL Address Bar (for Sql Reports)


Im struggling with passing the parameter on the URL Address bar...

heres what I have:

http://win-t8o9hquvjcf/Reports/Pages/Report.aspx?ItemPath=%2fDatasheetforOMManual&ProjectReference=65656

ProjectReference is the parameter wihin the Report Builder.. what am i doing wrong here?


Solution

  • worked it out, you have to use the ReportServer URL link, not the Reports on its own...

    http://yourservername/ReportServer/Pages/ReportViewer.aspx?%2fdatabasename%2freportname&rs:Command=Render&parameter=1
    

    adding &rs:Format=PDF displays it as a PDF...

    and for Lightswitch it works using the following:

    var param1 = screen.tablename.param1
    window.open("http://yourservername/ReportServer/Pages/ReportViewer.aspx?%2fdatabasename%2freportname&rs:Command=Render&parameter=1" + param1 + "&rs:Format=PDF");