Advanced Page Report Studio API application

Besides fundamental functions that Page Report Studio API provides, you can further obtain other instances from DHTMLClientService.

How to get the other instances

//Get a Page Report Studio API instance using the method 1 or
//2 provided in the preceding section, and then
//use the following method to get the other instances.

//The instance "service" is supposed to be derived
//from the above method 1 or 2.

 DHTMLConfig config = service.getDHTMLConfig();
 DHTMLDataInfo dataInfo = service.getDHTMLDataInfo();
 DHTMLWriter writer = service.getDHTMLWriter(sessionId, rptSetId)

How to use the other instances

Customizing Page Report Studio toolbar using the Page Report Studio API

Page Report Studio API provides you with the Page Report Studio interface. With the Page Report Studio API, you can easily embed the Page Report Studio page or components into your own JSP. Here jet.web.dhtml.DHTMLConfig is used to customize your own Page Report Studio toolbar.

To customize the Page Report Studio toolbar, you must add the following code to run_report.jsp in <intall_root>\public_html\dhtmljsp. And this code must be after the RunReport() method.

DHTMLClientService service = DHTMLServiceFactory.getDHTMLClientService(request);
DHTMLConfig	dhtmlConfig = service.getDHTMLConfig();
String SessionID = DHTMLUtil.getSessionID(request);
String RptSetId = DHTMLUtil.getRptSetId(request);
int[] bId = new int[]{DHTMLConstant.TOOLBAR_EXPORTTOPDF,DHTMLConstant.TOOLBAR_EXPORTTOXML,DHTMLConstant.TOOLBAR_SEARCH};
dhtmlConfig.customizeToolbar(SessionID, RptSetId, "View", bId, true);
dhtmlConfig.setUsedToolbar(SessionID, RptSetId, null, "View", true);

Reference: For more information on this topic, see the JReport Javadoc located in <install_root>\help\api.