Birt Report Viewer Customization- Yet another question [message #959355] |
Fri, 26 October 2012 16:58 |
birt 2010 Messages: 11 Registered: October 2012 |
Junior Member |
|
|
I am developing report application for two different companies. So ideally on the report viewer I would like to have different look and feeling. So if I am modifying framefragment.jsp( as suggested on the forum), how to maintain different look and feel? One idea is to keep two copies of framefragment.jsp, but I am not sure how to call specific one. Any ideas?
Please let me know
|
|
|
|
Re: Birt Report Viewer Customization- Yet another question [message #963081 is a reply to message #962876] |
Mon, 29 October 2012 15:07 |
|
The issue is that the Viewer uses code behind pages with JSP Fragments to construct the viewer. When you call the /frameset servlet mapping it in turn calls the class FramesetFragment.java which uses classname+.jsp. So creating two framesetfragment.jsp pages will be difficult unless you make major changes to the viewer. What is different with your two jsp pages?
Jason
|
|
|
|
|
|
Re: Birt Report Viewer Customization- Yet another question [message #963169 is a reply to message #963159] |
Mon, 29 October 2012 16:12 |
|
I put this in the body section of the framesetfragment:
<% Enumeration attrs = request.getAttributeNames();
while(attrs.hasMoreElements()) {
%>
<%=attrs.nextElement() + " -- "%>
<%}
%>
I modified the page import at the top like:
<%@ page import="org.eclipse.birt.report.presentation.aggregation.IFragment,
org.eclipse.birt.report.context.BaseAttributeBean,
org.eclipse.birt.report.resource.ResourceConstants,
org.eclipse.birt.report.resource.BirtResources,
org.eclipse.birt.report.utility.ParameterAccessor, java.util.Enumeration" %>
And it worked for me.
Jason
|
|
|
Re: Birt Report Viewer Customization- Yet another question [message #963220 is a reply to message #963169] |
Mon, 29 October 2012 16:56 |
birt 2010 Messages: 11 Registered: October 2012 |
Junior Member |
|
|
Hmm. I know what I did wrong "<%=" in my code was messing up. It should have been "<%".
I tried your snippet, I do see the attributes. Now I am getting the following error.
SEVERE: Servlet.service() for servlet [ViewerServlet] in context with path [/birt-viewer] threw exception [org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: javax.servlet.ServletException: File "/webcontent/birt/pages/parameter/HiddenParameterFragment.jsp" not found] with root cause
javax.servlet.ServletException: File "/webcontent/birt/pages/parameter/HiddenParameterFragment.jsp" not found
I am using Tomcat 7.0. I do not see the folder ../pages/parameter in my install.
[Updated on: Mon, 29 October 2012 17:48] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04144 seconds