Microsoft Reports and JavaScript

  • It it possible to open up SQL Reports through java script and the window.open command?

    Also does any one know of a method to hide the address of the report server when printing/viewing so that it does not show the user the parameters and other information ?

     

    Thank You,

    Dwayne

     

  • I see a few options.  First one is a bit cludgy, you work out (through viewing the rperts through report manager) what the URL's are that you want, then just use them in the window.open call.  Secondly, if you're used to using behaviours (htc's) in IE, then use the webservice htc and make web service calls to the RS web service from javascript.  This would let you make calls to discover the reports the user can view and then also make calls to render the reports as they select them.

    re: hiding the url bar, if you use you're window.open and set the properties for the window you can hide most (all?) of the additional toolbars in the IE interface.

    Ifyou're using firefox, then ignore all of the IE references (that's nearly the entire message ).

     

    Steve.

  • HERE is a sample of opening RS with JS.

    THE "rcarameters=false" part will hidden the parameters.

    javascript:open('/ReportServer?/SAMPLE_REPORTS/REPORT_NAME&rs:Command=Render&rcarameters=false&BatchID=" & selBatch.SelectedValue  & "' ,'','width=800,height=650,top=20,left=100,scrollbars=yes')") 

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

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