Home
Analytics
Birt Viewer Toolkit - how to hide/disable Launch Viewer menu option for an embedded report?
richardcooper25
<p>Hi,</p><p> </p><p>In the menu options for a JSAPI embedded report, there is the option to 'Launch Viewer'.</p><p> </p><p>In my case, for security and accessibility, reports should only be viewed within (or generated from) the browser page.</p><p> </p><p>How can I hide or disable the Launch Viewer option?</p><p> </p><p> </p><p>Thanks,</p><p> </p><p>Cheers,</p><p> </p><p>Richard</p><p> </p>
Find more posts tagged with
Comments
mwilliams
Can you show what your JSAPI code is?
richardcooper25
<p>Hi Mike,</p><p> </p><p>My code is just the same code as provided in samples that come with the BIRT Viewer Toolkit.</p><p> </p><p>I've attached an image of what I mean:</p><p> </p><p><img src='
http://www.firstimage.com.au/images/BIRT_Viewer_Toolkit_Menu.jpg'
alt='Posted Image' class='bbc_img' /></p><p> </p><p>Basically, I have a second app which I am embedding a report.</p><p>If I click on the menu (top left corner of the embedded report) I see the menu options as in the attached image.</p><p>If I select 'Launch Viewer', the Viewer opens at the URL of the first app (containing the BIRT Viewer Toolkit) so users will be taken out of the second app if they click on that menu option. I don't want users to be able to access the first app.</p><p> </p><p>Also, I'd like to hide or disable the 'Link to this page' menu option as this is also a security risk.</p><p> </p><p>Thank you.</p><p> </p><p>Cheers,</p><p> </p><p>Richard</p>
richardcooper25
<p>I'm OK now - I found the documentation to hide menu options:</p><p> </p><p><a data-ipb='nomediaparse' href='
http://www.actuate.com/be/documentation/ihub2/aic/help/jsapi/symbols/actuate.viewer.UIOptions.html'>http://www.actuate.com/be/documentation/ihub2/aic/help/jsapi/symbols/actuate.viewer.UIOptions.html</a></p><p> </p><p>Here
is some sample code below.</p><pre class="_prettyXprint"> var options = new actuate.viewer.UIOptions( ); // Hide Launch Viewer options.enableLaunchViewer(false); options.enableLinkToThisPage(false); options.enableContentMargin(false); options.enablePrint(false); // Hide menu // options.enableMainMenu(false); viewer.setUIOptions( options );</pre>
mwilliams
Sorry for the delay. Glad you found it!
dejank44
<div>I wonder where you find JSAPI file or I need to create? </div><div> </div><div>Thanks for the help</div>
pricher
<p>Hi,</p><p> </p><p>The JavaScript API (JSAPI) is a set of classes that help you embed BIRT reports and reportlets into web pages using div elements; therefore, you need to create the web page and embed the appropriate JSAPI calls.</p><p> </p><p>For more information on using the JSAPI, check out this link: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub3-dev/BVT/index.html#page/bvtguide/iPRef-web2api.15.01.html'>http://developer.actuate.com/be/documentation/ihub3-dev/BVT/index.html#page/bvtguide/iPRef-web2api.15.01.html</a></p><p> </p><p>You
can also take a look at landing.jsp in the root directory of your BIRT Viewer Toolkit installation to see a basic sample of using JSAPI.</p><p> </p><p>Hope this helps,</p><p> </p><p>P.</p>
Alexander Akhbar
<p>Where is the location file for JSAPI ?</p>
pricher
<p>Hi,</p>
<p> </p>
<p>To use the Actuate JavaScript API from a web page, simply add a script tag that loads the JavaScript API class libraries from the BIRT Viewer Toolkit application context.</p>
<p> </p>
<p>If your BIRT Viewer Toolkit is installed in context BVT and listening on port 8080 on your local machine, then the following tag will load the JSAPI:</p>
<p> </p>
<p><script type="text/javascript" language="JavaScript" src="<a data-ipb='nomediaparse' href='
http://localhost:8080/BVT/jsapi'>http://localhost:8080/BVT/jsapi"></script></a></p>
;
<p> </p>
<p>More information can be found at: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub3-dev/BVT/index.html#page/bvtguide/iPortal-web2api.14.03.html'>http://developer.actuate.com/be/documentation/ihub3-dev/BVT/index.html#page/bvtguide/iPortal-web2api.14.03.html</a></p>
;
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>