Skip to Content

Have you ever wanted to easily hide the Crystal Reports 2008 toolbar in the web viewer?

 

Have you ever wanted to hide the drill-down tabs in the viewer?

 

How about changing the viewer background to white and aligning your content to the left of the viewer?

 

There are 3 great (yet little known) features in opendocument linking syntax that you can use to do the above. This is, again, for Crystal Reports 2008. If you have an earlier version, see the bottom of the article regarding using webelements to customize the toolbar.

 

Here’s how to use these features:

 

1) first you have to publish a hyperlink to InfoView instead of giving your users direct access to the report. for example, the hyperlink below is for my sales report and i am putting in a default value for the country parameter. the end user will click on this hyerlink in InfoView instead of clicking on the report itself. hide the report in another folder that they don’t have access to.

 

/OpenDocument/opendoc/openDocument.jsp?sType=rpt&sIDType=Name&sDocName=SalesReport&lsSCountry=Canada

 

2) to hide the toolbar, add “&toolbar=hide” to the end of your hyperlink. this will hide the toolbar in the Crystal Reports viewer. this is handy if you have reports wherein there is no real need to show the toolbar or you don’t want the end user to access toolbar features.

 

3) to hide the drill-down tabs, add “&drilldowntabs=hide” to your hyperlink. this will hide all of the current and future drill-down tabs in the viewer. this is very useful if you don’t want to have a collection of the drill-down tabs amassing at the top of the viewer.

 

if you do decide to hide the drill-down tabs, you can use report part linking to navigate back to the start of the report after drilling down. this can give a better user experience as you feel like you are on the same page all of the time versus bouncing from tab to tab. For more information on how to do this, look up “report part linking” in your on line help for Crystal Reports.

 

4) to change the background of the viewer to white and to align the viewer content to the left instead of having it centered, add “&sReportMode=weblayout” to your hyperlink.

 

here’s a picture before using the above mentioned opendocument switches:

 

here’s a picture after using the above mentioned opendocument switches:

remember that opendocument syntax is case sensitive. for more information on opendocument syntax, please see the document here.

 

if you want a method to allow the end user to suppress or hide or open toolbars, or to suppress or hide or open scrollbars, you can do this with webelements. there is a function “weviewer” that allows this funcitonality. for more information on webelements please see the page Crystal Reports webElements. the webelements method will work in XI, XIr2, and CR2008.

 

you can also hide certain buttons, such as the Export button, in the toolbar using webelements.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member

    This is awesome.  Just curious, are there any other secret parameters lurking in there?  I had a look at the source in the OpenDocument.war, and I couldn’t even find toolbar or drilldowntabs in there. 

    Mostly I am curious if there is a way to turn off the left pane (I believe it is the group pane).

    Basically, I am trying to have a whole report show up, but have it show up in something that looks like the partViewer. 

    The other choice would be if there were a way to get the partViewer to show an entire report, which I can’t seem to figure out either.

    thanks

    (0) 
    1. Jamie Wiseman Post author

      hi Scott,

      there is an additional switch for the bi 4.0+ viewers which is “&statusbar=hide” which will hide a bunch of the viewer wrapper. those are all of the available viewer switches for opendoc that i’m aware of.

      using all of those options should in theory allow you to have a report viewer that has no wrapper or tabs etc. and thus allow you to embed a viewer that doesn’t look like a report viewer into a web page.

      unfortunately the report part viewer will not allow multiple parts or subreports or entire reports.

      cheers,

      jamie

      (0) 

Leave a Reply