Jump to content

BIRT Developer Center Download


Photo

Disable toolbar in the viewer


  • Please log in to reply
3 replies to this topic

#1 bcmp

bcmp

    Advanced Member

  • Members
  • PipPipPip
  • 83 posts

Posted 10 August 2017 - 09:57 AM

How to disable the toolbar of the viewer through the report. Any sample would be great



#2 mblock

mblock

    Expert Member

  • BIRT Experts
  • 1888 posts

Posted 10 August 2017 - 10:15 AM

is this commercial or OS BIRT?


Regards,

Mica J. Block

Principal Analytics Architect

OpenText Corporation


#3 Matthew L.

Matthew L.

    Senior Member

  • BIRT Experts
  • 282 posts

Posted 10 August 2017 - 10:29 AM

If this is for Commercial (PRO) versions, I've attached an example that demonstrates this request along with some other features that can be enabled/disabled from within the report design.

 

For reference, here is some example code that enables/disables Actuate Interactive Viewer options from within the reports "onContentUpdate" section.

if(window["__first_load"]=== undefined) {
	window["__first_load"] = true;

	//http://developer.actuate.com/be/documentation/ihub2/aic/help/jsapi/symbols/actuate.Viewer$0.html
	var ivViewer = this.getViewer()  //Get Actuate Interactive Viewer
		//ivViewer.showParameterPanel();  //Show Parameter Panel
		//ivViewer.showPrintDialog();  //Show Print dialog window
		//ivViewer.showDownloadResultSetDialog();  //Show Export Data dialog window
		//ivViewer.showDownloadReportDialog();
		//ivViewer.showTocPanel();  //Show Table Of Contents

	//http://developer.actuate.com/be/documentation/ihub2/aic/help/jsapi/symbols/actuate.viewer.UIOptions.html
	var uiOptions = ivViewer.getUIOptions();  //Interactive Viewer Options
		//uiOptions.enableEditReport(false);  //Remove "Enable Interactivity" menu option
		//uiOptions.enableExportReport(true);  //diable report export menu item
		uiOptions.enableToolBar(false);//disable toolbar
		//uiOptions.enableToolbarContextMenu(false);  //disable viewer right-click context menus
		//uiOptions.enableTOC(false);  //disable TOC
		//uiOptions.enableParameterPage(false);  //disable parameters
		//uiOptions.enableLinkToThisPage(false);// disable link to this page
		//uiOptions.enableDataExtraction(false);//disable export data
		//uiOptions.enableSaveDesign(false);//disable save design
		//uiOptions.enableSaveDocument(false);//disable save document
		//uiOptions.enableHideShowItems(false);//disable hide/show item
		//uiOptions.enableToolbarHelp(false);// disable help
		//uiOptions.enableLaunchViewer(false);

		ivViewer.setUIOptions(uiOptions);  //Apply options
}


Matthew L.
Actuate is now OpenText
http://www.actuate.com


#4 mblock

mblock

    Expert Member

  • BIRT Experts
  • 1888 posts

Posted 12 August 2017 - 06:24 PM

In the designer if you create a new report with 'Blank Auto Interactive Report', you will see the code to enable IV by default in the onContentUpdate method. You can do the same for disabling the toolbar. The code is:

uiOptions.enableToolBar(false);

Regards,

Mica J. Block

Principal Analytics Architect

OpenText Corporation