On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.
Change Report Design Before Running Report
This example shows how you can use the BIRT Design Engine API and dynamically modify a report prior to exectution. This is useful when you have several reports that have been built generically, but need to be personalized based on the user or other identifiable information. This could also be accomplished with scripting within the report design itself, but this approach is useful when you have several reports and don't want to build the scripting logic into each report.<br />
<br />
This example contains a singleton class which returns instances of the Design Engine and a servlet filter which is responsible for changing the design. The servlet filter included with this example only changes the author name, however you could change any aspect of the design you wish. Common changes to the design include changing the data source or properties of the data source, changing images, changing CSS/Theme/Style settings, etc.<br />
<br />
In order for the servlet filter to be called, you must include a filter mapping in the web.xml. The Actuate BIRT Viewer supports both the open source sample viewer URL's and the Actuate Viewer URL's. To filter on the open source based URL's, the servlet-name you should use in the filter mapping is ViewerAdapterServlet. To filter on the Actuate URL's, the servlet you should filter on is IVServlet.
Modify the DesignFilter as needed, package the classes in a JAR and place in the WEB-INF/lib directory and restart the application.
<br />
This example contains a singleton class which returns instances of the Design Engine and a servlet filter which is responsible for changing the design. The servlet filter included with this example only changes the author name, however you could change any aspect of the design you wish. Common changes to the design include changing the data source or properties of the data source, changing images, changing CSS/Theme/Style settings, etc.<br />
<br />
In order for the servlet filter to be called, you must include a filter mapping in the web.xml. The Actuate BIRT Viewer supports both the open source sample viewer URL's and the Actuate Viewer URL's. To filter on the open source based URL's, the servlet-name you should use in the filter mapping is ViewerAdapterServlet. To filter on the Actuate URL's, the servlet you should filter on is IVServlet.
< filter > < filter-name >DesignFilter< /filter-name > < filter-class>com.actuate.sample.DesignFilter< /filter-class > < /filter > < filter-mapping > < filter-name >DesignFilter< /filter-name > < servlet-name >ViewerAdapterServlet< /servlet-name> < /filter-mapping ><br />
Modify the DesignFilter as needed, package the classes in a JAR and place in the WEB-INF/lib directory and restart the application.
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax