Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Export report only as PDF
sendu
Hi,
How can I export the report only as pdf. I tried commenting
# [EXTENSION SETTING]
# [OUTPUT FORMAT LABEL NAME]
from 'viewer.properties' other than pdf
if i did so, in the export dialog i am get the extensions, it'll be better if i can disable all the options other than pdf
thanks
senduran
Find more posts tagged with
Comments
mcremer
<blockquote class='ipsBlockquote' data-author="'sendu'" data-cid="82149" data-time="1314791539" data-date="31 August 2011 - 04:52 AM"><p>
Hi,<br />
How can I export the report only as pdf. I tried commenting <br />
# [EXTENSION SETTING]<br />
# [OUTPUT FORMAT LABEL NAME]<br />
from 'viewer.properties' other than pdf <br />
if i did so, in the export dialog i am get the extensions, it'll be better if i can disable all the options other than pdf<br />
<br />
thanks<br />
senduran<br /></p></blockquote>
<br />
A quick question were did you edit the viewer.properties?<br />
<br />
Did you do that in your Eclipse BIRT dir\plugins\org.eclipse.birt.report.viewer_x.x.x.x_v20110214\birt\WEB-INF<br />
<br />
(relace teh x with your version?)
sendu
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82151" data-time="1314792414" data-date="31 August 2011 - 05:06 AM"><p>
A quick question were did you edit the viewer.properties?<br />
<br />
Did you do that in your Eclipse BIRT dir\plugins\org.eclipse.birt.report.viewer_x.x.x.x_v20110214\birt\WEB-INF<br />
<br />
(relace teh x with your version?)<br /></p></blockquote>
<br />
Hi,<br />
No. I edited it in the .../birt-runtime-2_6_2/WebViewerExample/WEB-INF<br />
I am deploying this on tomcat do I have to change the viewer.properties that you mentioned me ?<br />
I think this will only effect in the eclipse <br />
<br />
thanks
mcremer
<blockquote class='ipsBlockquote' data-author="'sendu'" data-cid="82152" data-time="1314794972" data-date="31 August 2011 - 05:49 AM"><p>
Hi,<br />
No. I edited it in the .../birt-runtime-2_6_2/WebViewerExample/WEB-INF<br />
I am deploying this on tomcat do I have to change the viewer.properties that you mentioned me ?<br />
I think this will only effect in the eclipse <br />
<br />
thanks<br /></p></blockquote>
<br />
You need to make sure that its also disaibled in the JAR that you deploy in your WAR. thats all
hence me pointing that out that you should check that plugin in in general the one your deploying.
sendu
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82155" data-time="1314797921" data-date="31 August 2011 - 06:38 AM"><p>
You need to make sure that its also disaibled in the JAR that you deploy in your WAR. thats all
hence me pointing that out that you should check that plugin in in general the one your deploying.<br /></p></blockquote>
<br />
could you please tell me what is the JAR you are referring to. I copied the WEB-INF,webcontent folders from the WebViewerExample to my project in that I couldn't find the plugin that you mentioned me earlier.<br />
<br />
there is a string array called 'supportedFormats' inside the /webcontent/birt/pages/dialog/ExportReportDialogFragment.jsp file. If i could control the array i may be disable the other formats other than pdf<br />
am i wrong ? <br />
need your help
mcremer
<blockquote class='ipsBlockquote' data-author="'sendu'" data-cid="82186" data-time="1314848778" data-date="31 August 2011 - 08:46 PM"><p>
could you please tell me what is the JAR you are referring to. I copied the WEB-INF,webcontent folders from the WebViewerExample to my project in that I couldn't find the plugin that you mentioned me earlier.<br />
<br />
there is a string array called 'supportedFormats' inside the /webcontent/birt/pages/dialog/ExportReportDialogFragment.jsp file. If i could control the array i may be disable the other formats other than pdf<br />
am i wrong ? <br />
need your help<br /></p></blockquote>
<br />
Im not sure what you war file your using as designed. But the most of the Eclipse Webased products work with an OSGI container. But I can be wrong with Birt. I havent been that deep in it and we use the iServer here. But you could in deed edit the JSP page directly it certanly would fix the problem.
sendu
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82195" data-time="1314865665" data-date="01 September 2011 - 01:27 AM"><p>
Im not sure what you war file your using as designed. But the most of the Eclipse Webased products work with an OSGI container. But I can be wrong with Birt. I havent been that deep in it and we use the iServer here. But you could in deed edit the JSP page directly it certanly would fix the problem.<br /></p></blockquote>
<br />
<br />
How is the 'supportedFormats' array is initialized <br />
from where it gets the supported formats, i earlier thought it is loading from the viewer.properties file but it is not correct<br />
<br />
what i am missing ? how to disable the other formats?
abhijitKol
I already tried after commenting the pdf option from viewer.properties.<br />
# [EXTENSION SETTING]<br />
# [OUTPUT FORMAT LABEL NAME]<br />
<br />
But it is not working.Still the pdf option is coming.<br />
After changing the viewer.properties file,I have made a war file and deployed it in the Jboss.I am using eclipse.Am I missing something??<br />
<br />
Thanks<br />
Abhijit<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82155" data-time="1314797921" data-date="31 August 2011 - 06:38 AM"><p>
You need to make sure that its also disaibled in the JAR that you deploy in your WAR. thats all
hence me pointing that out that you should check that plugin in in general the one your deploying.<br /></p></blockquote>
mcremer
<blockquote class='ipsBlockquote' data-author="'abhijitKol'" data-cid="82199" data-time="1314868893" data-date="01 September 2011 - 02:21 AM"><p>
I already tried after commenting the pdf option from viewer.properties.<br />
# [EXTENSION SETTING]<br />
# [OUTPUT FORMAT LABEL NAME]<br />
<br />
But it is not working.Still the pdf option is coming.<br />
After changing the viewer.properties file,I have made a war file and deployed it in the Jboss.I am using eclipse.Am I missing something??<br />
<br />
Thanks<br />
Abhijit<br /></p></blockquote>
<br />
Ok I quickly downloaded the runtime.<br />
<br />
Can you share your whole viewer.properties?
abhijitKol
###############################################################################<br />
# Copyright (c) 2004 Actuate Corporation.<br />
# All rights reserved. This program and the accompanying materials<br />
# are made available under the terms of the Eclipse Public License v1.0<br />
# which accompanies this distribution, and is available at<br />
# <a class='bbc_url' href='
http://www.eclipse.org/legal/epl-v10.html'>http://www.eclipse.org/legal/epl-v10.html</a><br
/>
#<br />
# Contributors:<br />
# Actuate Corporation - initial API and implementation<br />
###############################################################################<br />
<br />
# configurable variable for JSP base href. Please uncomment the below line.<br />
#base_url=
http://127.0.0.1:8080<br
/>
<br />
# [EXTENSION SETTING]<br />
viewer.extension.html=html<br />
#viewer.extension.pdf=pdf<br />
viewer.extension.postscript=ps<br />
viewer.extension.doc=doc<br />
viewer.extension.xls=xls<br />
viewer.extension.ppt=ppt<br />
viewer.extension.ods=ods<br />
viewer.extension.odt=odt<br />
viewer.extension.odp=odp<br />
<br />
# [OUTPUT FORMAT LABEL NAME]<br />
viewer.label.html=HTML<br />
#viewer.label.pdf=PDF<br />
viewer.label.postscript=PostScript<br />
viewer.label.doc=Word<br />
viewer.label.xls=Excel<br />
viewer.label.ppt=PowerPoint<br />
viewer.label.ods=OpenDocument Spreadsheet<br />
viewer.label.odt=OpenDocument Text<br />
viewer.label.odp=OpenDocument Presentation<br />
<br />
# [CSV SEPARATOR]<br />
viewer.sep.0=,<br />
viewer.sep.1=;<br />
viewer.sep.2=:<br />
viewer.sep.3=|<br />
viewer.sep.4=\t<br />
<br />
# [VIEWING SESSION CONFIGURATION]<br />
# The BIRT viewing session is a sub-session of the HTTP session.<br />
# An HTTP session can have multiple BIRT viewing sessions.<br />
# Each time a new viewer is opened, a new viewing session is created. <br />
# The following parameters are used to configure the viewing session<br />
# management.<br />
# If the matching HTTP session expires, all the viewing sessions<br />
# attached to it will expire as well.<br />
<br />
# Timeout value in seconds after which a viewing session will expire.<br />
# The value 0 means that a session will never expire, and the cached files<br />
# will never be cleant unless the belonging HTTP session expires.<br />
viewer.session.timeout=0<br />
<br />
# Defines a session count threshold after which the cleanup process<br />
# will try to clean up expired sessions.<br />
viewer.session.minimumThreshold=20<br />
<br />
# Load factor to recalculate the minimum threshold value based on the remaining<br />
# session count after cleanup.<br />
viewer.session.loadFactor=0.75<br />
<br />
# Maximum number of simultaneous viewing sessions that can be open at the<br />
# same time, to prevent cache overflowing through multiple requests.<br />
# A value of 0 means no limit.<br />
viewer.session.maximumSessionCount=0<br />
<br />
# Behavior that must be used once the maximum session count is reached<br />
# (if different than 0):<br />
# - A value of 0 will use the "Discard new session" policy that will show<br />
# an error message for all the newer sessions.<br />
# - A value of 1 will use the "Discard the oldest session" policy that will<br />
# try to discard the oldest session, even if it has not expired yet.<br />
# Note that "busy" sessions (for example downloading results) won't be<br />
# cleant by this mechanism.<br />
viewer.session.maximumSessionCountPolicy=1<br />
<br />
# [LOGGERS]<br />
# "logger."+class=level<br />
# if no level is specified or the text "DEFAULT",<br />
# then the default level from the web.xml will be used<br />
logger.org.eclipse.datatools.connectivity.oda=DEFAULT<br />
logger.org.eclipse.datatools.enablement.oda=DEFAULT<br />
<br />
<br />
<br />
<br />
Thanks<br />
Abhijit<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82201" data-time="1314870125" data-date="01 September 2011 - 02:42 AM"><p>
Ok I quickly downloaded the runtime.<br />
<br />
Can you share your whole viewer.properties?<br /></p></blockquote>
sendu
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82201" data-time="1314870125" data-date="01 September 2011 - 02:42 AM"><p>
Ok I quickly downloaded the runtime.<br />
<br />
Can you share your whole viewer.properties? <br /></p></blockquote>
<br />
I'll attach my viewer.properties <br />
i need only pdf but Abhijit doesn't want pdf (I guess Abhijit's viewer.properties may be other way, commented only pdf) <br />
<br />
I didn't comment the HTML because 'if ( !ParameterAccessor.PARAM_FORMAT_HTML.equalsIgnoreCase( supportedFormats
) )' line in /webcontent/birt/pages/dialog/ExportReportDialogFragment.jsp checking for html (may be i am totally wrong) <br />
even i commented html i am getting all formats<br />
<br />
note:i have renamed to .txt i couldn't upload the .properties extension
mcremer
It looks correct im afraid I cant help you eny furter mabe somone from Actuate can help you but it should work. But are you sure there are no other viewers war running? and did you resart the war.
abhijitKol
@mcremer<
;br />
I have checked viewer.properties file in the war.The commented lines are there.but still not working..<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82201" data-time="1314870125" data-date="01 September 2011 - 02:42 AM"><p>
Ok I quickly downloaded the runtime.<br />
<br />
Can you share your whole viewer.properties?<br /></p></blockquote>
sendu
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="82210" data-time="1314879324" data-date="01 September 2011 - 05:15 AM"><p>
It looks correct im afraid I cant help you eny furter mabe somone from Actuate can help y<br />
ou but it should work. But are you sure there are no other viewers war running? and did you resart the war.<br /></p></blockquote>
<br />
No. No other viewers running. <br />
But still i am getting all the formats, any way thank you mcremer<br />
<br />
can any one please tell me how to control the supportedFormats array ?
canutri
With the outer most container (grid or table for example) of the report selected, from the properties view Visibility sub-tab, check off all the boxes to hide execpt for pdf.
Daron
sendu
<blockquote class='ipsBlockquote' data-author="'canutri'" data-cid="82417" data-time="1315452376" data-date="07 September 2011 - 08:26 PM"><p>
With the outer most container (grid or table for example) of the report selected, from the properties view Visibility sub-tab, check off all the boxes to hide execpt for pdf.<br />
<br />
Daron<br /></p></blockquote>
thanks for your response, i check off all the boxes except pdf and html(as i am viewing in the web) but i still could able to generate the other format reports. it'll be better if i can remove the other formats form the export report dialog
sendu
<blockquote class='ipsBlockquote' data-author="'sendu'" data-cid="82564" data-time="1315797840" data-date="11 September 2011 - 08:24 PM"><p>
thanks for your response, i check off all the boxes except pdf and html(as i am viewing in the web) but i still could able to generate the other format reports. it'll be better if i can remove the other formats form the export report dialog<br /></p></blockquote>
<br />
<br />
Hi,<br />
I got a solution i can simply edit the 'supportedFormats' array like <br />
String[] supportedFormats = {"pdf"};<br />
this does what I need.<br />
<br />
i think the viewer.properties only modify the drop down box (i.e if the supported format is xls the viewer.properties has both the xls and Excel, so we are getting the Label as Excel) correct me if i am wrong
johnw
Go into your platform/plugins folder in your Tomcat installation (in my case, this is located at C:\Tomcat_5.5\apache-tomcat-5.5.34\webapps\WebViewerExample\WEB-INF\platform\plugins), and remove the following files:
org.eclipse.birt.report.engine.emitter.wpml_XXXXXXXXXX.jar
org.eclipse.birt.report.engine.emitter.wpml.config_XXXXXXXXXX.jar
org.eclipse.birt.report.engine.emitter.prototype.excel_XXXXXXXXXX.jar
org.eclipse.birt.report.engine.emitter.ppt_XXXXXXXXXX.jar
org.eclipse.birt.report.engine.emitter.ppt.config_XXXXXXXXXX.jar
org.eclipse.birt.report.engine.emitter.postscript_XXXXXXXXXX.jar
org.eclipse.birt.report.engine.emitter.postscript.config_XXXXXXXXXX.jar
org.eclipse.birt.report.engine.emitter.excel.config_XXXXXXXXXX.jar
where XXXXXXXXXX is the version stamp on the files. Once you remove these files, OSGi (or the plugin manager in the 3.7 web viewer) won't load the plugins, so they will not display in the list. The viewer.properties file is just a properties file, all it does is check the label based on the plugins ID, and if it can't find it in the properties file, it will use the default name from the manifest.
sendu
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="83292" data-time="1317051450" data-date="26 September 2011 - 08:37 AM"><p>
Go into your platform/plugins folder in your Tomcat installation (in my case, this is located at C:\Tomcat_5.5\apache-tomcat-5.5.34\webapps\WebViewerExample\WEB-INF\platform\plugins), and remove the following files:<br />
<br />
org.eclipse.birt.report.engine.emitter.wpml_XXXXXXXXXX.jar<br />
org.eclipse.birt.report.engine.emitter.wpml.config_XXXXXXXXXX.jar<br />
org.eclipse.birt.report.engine.emitter.prototype.excel_XXXXXXXXXX.jar<br />
org.eclipse.birt.report.engine.emitter.ppt_XXXXXXXXXX.jar<br />
org.eclipse.birt.report.engine.emitter.ppt.config_XXXXXXXXXX.jar<br />
org.eclipse.birt.report.engine.emitter.postscript_XXXXXXXXXX.jar<br />
org.eclipse.birt.report.engine.emitter.postscript.config_XXXXXXXXXX.jar<br />
org.eclipse.birt.report.engine.emitter.excel.config_XXXXXXXXXX.jar<br />
<br />
where XXXXXXXXXX is the version stamp on the files. Once you remove these files, OSGi (or the plugin manager in the 3.7 web viewer) won't load the plugins, so they will not display in the list. The viewer.properties file is just a properties file, all it does is check the label based on the plugins ID, and if it can't find it in the properties file, it will use the default name from the manifest.<br /></p></blockquote>
<br />
Thank you johnw
<br />
this is better than manually editing the supportedFormats array
abhijitKol
<blockquote class='ipsBlockquote' data-author="'sendu'" data-cid="83332" data-time="1317095027" data-date="26 September 2011 - 08:43 PM"><p>
Thank you johnw
<br />
this is better than manually editing the supportedFormats array<br /></p></blockquote>
GMz
If you would like to hide export option on BIRT 3.7 and print to html or pdf only, you have to edit "C:\apache-tomcat-7.0.26\webapps\WebViewerExample\webcontent\birt\pages\control\ToolbarFragment.jsp".
You have to comment this line.
<!--<TD WIDTH="15px">
<INPUT TYPE="image" NAME='exportReport' SRC="birt/images/ExportReport.gif"
TITLE="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.exportreport" )%>"
ALT="<%= BirtResources.getHtmlMessage( "birt.viewer.toolbar.exportreport" )%>"
CLASS="birtviewer_clickable">
</TD>-->