Jump to content

Recommended Posts

Posted

hi, guys, I have successfully run the Custom Visualization Component in the jasperserver-pro(localhost:8080/jasperserver-pro), which is commercial version. but faild in the community version(localhost:8080/jasperserver). so I want to know the reason is the difference between the two version or something I have donw wrong. I do this cause I want to integrate with D3.js

any suggestions would be appreciated 

this is the link I followed, worked on pro version : http://community.jaspersoft.com/wiki/custom-visualization-component-v60x

the community version I use:

jasperreports-server-cp-6.0.1-bin

jars:htmlcomponent.jar, jasperreports-customvisualization-6.0.1.jar, mysql-connector-java-5.1.25-bin.jar, phantomjs works

and my jasperreports.properties:

com.jaspersoft.jasperreports.components.customvisualization.require.js=file:///usr/local/Cellar/tomcat7/7.0.59/libexec/webapps/jasperserver/optimized-scripts/bower_components/requirejs/require.js
net.sf.jasperreports.web.resource.pattern.customvisualization.scripts=com/jaspersoft/jasperreports/customvisualization/resources/require
com.jaspersoft.jasperreports.components.customvisualization.phantomjs.executable.path=file:///usr/bin/phantomjs
 
net.sf.jasperreports.query.executer.factory.sql=com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuterFactory
net.sf.jasperreports.query.executer.factory.HiveQL=com.jaspersoft.hadoop.hive.HiveQueryExecuterFactory
 
#limit the crosstab bucket/measure count to prevent out of memory errors
net.sf.jasperreports.crosstab.bucket.measure.limit=100000
 
#suppress page and column footers and all but the first page and column headers when exporting to XLS
net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1=pageHeader
net.sf.jasperreports.export.xls.exclude.origin.band.2=pageFooter
net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.3=columnHeader
net.sf.jasperreports.export.xls.exclude.origin.band.4=columnFooter
 
# report exporter hints override export parameters
net.sf.jasperreports.export.parameters.override.report.hints=false
 
# use the workaround for the Sun JDK Glyph synchronization bug
net.sf.jasperreports.text.measurer.factory=net.sf.jasperreports.engine.util.JdkGlyphFixTextMeasurerFactory
 
# the fast/single line text measurer factory
net.sf.jasperreports.text.measurer.factory.single.line=com.jaspersoft.jasperserver.api.engine.jasperreports.util.SingleLineTextMeasurerFactory
 
# the default chart theme to use
#net.sf.jasperreports.chart.theme=eye.candy.sixties
 
# override the JR MDX query executer
net.sf.jasperreports.query.executer.factory.mdx=com.jaspersoft.jasperserver.api.engine.jasperreports.util.JSMdxQueryExecuterFactory
net.sf.jasperreports.query.executer.factory.MDX=com.jaspersoft.jasperserver.api.engine.jasperreports.util.JSMdxQueryExecuterFactory
 
# save line break positions at fill time
net.sf.jasperreports.text.save.line.breaks=true
 
# nested tables can cause column misalignments
net.sf.jasperreports.export.html.frames.as.nested.tables=false
#net.sf.jasperreports.export.html.border.collapse=separate
 
# ignore missing fonts in reports
net.sf.jasperreports.awt.ignore.missing.font=true
 
# allow element negative width
net.sf.jasperreports.allow.element.negative.width=true
 
# switch between new XHTML to the former HTML exporter
com.jaspersoft.jasperreports.export.html.type=html2
#com.jaspersoft.jasperreports.export.html.type=xhtml
#com.jaspersoft.jasperreports.export.html.type=html
 
# date patterns for JR interactive components
#net.sf.jasperreports.components.date.pattern.key=date.format
#net.sf.jasperreports.components.calendar.date.pattern.key=calendar.date.format
 
net.sf.jasperreports.web.report.resources.path=/reportresource/reportresource
net.sf.jasperreports.web.request.parameter.resource.uri=resource
 
net.sf.jasperreports.print.transfer.jrs.export=com.jaspersoft.jrs.export
#com.jaspersoft.jrs.export.csv.paginated=true
#com.jaspersoft.jrs.export.xls.paginated=true
#com.jaspersoft.jrs.export.pdf.paginated=false
#com.jaspersoft.jrs.export.docx.paginated=false
#com.jaspersoft.jrs.export.rtf.paginated=false
#com.jaspersoft.jrs.export.odt.paginated=false
 

 

  • 9 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted

Hi Chengyang,

the trick is to set the proper configuration in jasperreports.properties (on an windows machine):

com.jaspersoft.jasperreports.components.customvisualization.require.js=file:/C:/path/to/require.js net.sf.jasperreports.web.resource.pattern.customvisualization.scripts=com/jaspersoft/jasperreports/customvisualization/resources/require/.*

See the "file:/...." and "...require/.* specially... (a bit different than in the jaspersoft docs...). I hope this helps on an *nix-box too.

Cheers, Thomas

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...