I'm using Eclispse BIRT version 4.7.0 to run reports in various formats,
My report has a date field in the following format: 'DD/MM/YYYY/'
When I run the report through the Eclipse BIRT Designer application, with the WebViewer, or to PDF for example, the date comes printed in the expected format, for example it prints '05/07/2006'
But when I run the report using the Runtime Engine (via command line) it prints the same date value like this: 'Jul, 5, 2006'
Does anyone know why this is happening and how to solve it?
Thank you!
Related
Im using Jaspersoft Studio to design my reports and JasperReports Server to publish them for my php web application.
In one of my reports it contains some float numbers displayed in the format 103.12 but i want it to be displayed like this: 103,12 and when it reaches 5 digits like this 50 000,14.
After some reading i tried to set the local to french but nothing changed.
And when i change the pattern in the jasperstudio to # ###,00 i get this :
and for the old pattern #,###.00 that comes by default in the jasperstudio i get this :
Analysis
We dealt with this as well. The locale which is being set in the JasperReports server login page is just for the admin UI, not for the report generation.
Solution
If you want to have a different locale set on your server, you need to set it in the JasperReports server config in /jasperreport-path/apache-tomcat/bin/setenv.sh (add it into one of those JAVA_OPTS):
-Duser.language=FR -Duser.country=FR
Now all locale-specific settings will be correctly configured and putting #,###.00 as a pattern for the field will be translated to your locale format by default in the server. So for the french format would be displayed like this: 1 000,12.
I know this may be duplicate question.
I have this error when I start my community jasperserver, and load a report has custom visualization component , and this error occur.
disappear. when I call:
http://localhost:8080/jasperserver/reportresource/reportresource?resource=com/jaspersoft/jasperreports/customvisualization/resources/require/cv-component.js
nothing returns, so this may be the problem right ?
but when I start the jasperserver commercial version , this error disappear. when I call:
http://localhost:8080/jasperserver-pro/reportresource/reportresource?resource=com/jaspersoft/jasperreports/customvisualization/resources/require/cv-component.js
it returns the content of this cv-component.js.
any idea ?
the trick (which wored for me after hours of triel-and-error) 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 teh jaspersoft docs...)
Cheers, Thomas
I´m having some problems to create reports in my server without default export engine.
I´m using SpudSoft to create it. I have the following configuration:
Tomcat 7
Birt 4.2.2
uk.co.spudsoft.birt.emitters.excel_0.8.0.201310230652.jar
And i followed this tutorial:
spudsoft-birt-excel-emitters
I haven´t include this file
lib/slf4j-api-1.6.2.jar
because it´s not included in the *.jar file
and either wrote this code:
'if( "XLS".equalsIgnoreCase( outputFileFormat ) ) {
renderOption.setEmitterID( "uk.co.spudsoft.birt.emitters.excel.XlsEmitter" );
} else if( "XLSX".equalsIgnoreCase( outputFileFormat ) ) {
renderOption.setEmitterID( "uk.co.spudsoft.birt.emitters.excel.XlsxEmitter" );
}'
Because I dont really know where to use it.
to run my report i use the following URL
http://127.0.0.1:8090/birt-viewer/frameset?__format=xls&__report=informes/myReport.rptdesign&__emitterid=uk.co.spudsoft.birt.emitters.excel.XlsEmitter
and i get the following message:
org.eclipse.birt.report.service.api.ReportServiceException: EmitterID uk.co.spudsoft.birt.emitters.excel for render option is invalid.
What can i do to run SpudSoft report? I've been reading for a week and I haven´t found any solution!
Thanks a lot for all!
#Dominique,
I recommend upgrading from the emitter included with BIRT 4.3 (and given the lack of responses from the BIRT team I regret letting them put it in there).
Also, you don't need to use a specific IRenderOption type - they are all the same really anyway.
#Jota,
If you are getting that error it means that BIRT hasn't picked up the emitter correctly (you do have the correct emitter ID).
I don't use the BIRT war file, so my instructions aren't aimed at that approach (I just use the report engine in my own service).
The code snippet is no use for you, it's just a way to specify the emitter ID, which you are doing on the query string.
slf4j shouldn't be needed with the version of the emitter that you have - it uses JUL instead (I hate JUL, but it's one fewer dependency).
Can you post a complete listing of the jar files in your war?
It seems because you make use of a generic IRenderOption. With spudsoft emitter you should instantiate your render options like this:
EXCELRenderOption excelOptions = new EXCELRenderOption();
Note if you upgrade to BIRT 4.3 you don't have to set the emitter anymore, it is embedded
An HTML5 chart based on the second dataset is throwing error. The chart type is stacked column chart. Basing two charts on the same dataset works and gives exactly the same chart (as expected).
Subsequently pointing one of the charts to the second dataset gives an error:
Error displaying report page. See the console for details.
But there are no details in the console.
The sub dataset in the chart has been set and the connection expression has been set to Use Connection Expression.
I am using iReport 5.1.0
Any help will be appreciated.
More details from today's debugging: Choosing PDF preview dumps the following error to the output:
Compiling to file... H:\QED\Design Specs\JasperReports5\New Reports\report6.jasper
Compilation running time: 1,170!
Filling report...
Locale: English (United States)
Time zone: Default
Setting up the file resolver...
Report fill running time: 249! (pages generated: 3)
Exporting PDF (using iText) to file... H:\QED\Design Specs\JasperReports5\New Reports\report6.pdf!
Error exporting print... org.apache.batik.bridge.BridgeException: null:-1 The attribute "y" of the element <text> is invalid
net.sf.jasperreports.engine.JRRuntimeException: org.apache.batik.bridge.BridgeException: null:-1 The attribute "y" of the element <text> is invalid
at com.jaspersoft.jasperreports.highcharts.charts.ChartPdfHandler.exportElement(ChartPdfHandler.java:45)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportGenericElement(JRPdfExporter.java:2750)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:868)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:820)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:697)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:419)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:1174)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Caused by: org.apache.batik.bridge.BridgeException: null:-1 The attribute "y" of the element <text> is invalid
at org.apache.batik.bridge.SVGTextElementBridge.getLocation(SVGTextElementBridge.java:253)
at org.apache.batik.bridge.SVGTextElementBridge.createGraphicsNode(SVGTextElementBridge.java:209)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:213)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
at net.sf.jasperreports.renderers.BatikRenderer.ensureSvg(BatikRenderer.java:224)
at net.sf.jasperreports.renderers.BatikRenderer.ensureSvg(BatikRenderer.java:239)
at net.sf.jasperreports.renderers.BatikRenderer.getDimension(BatikRenderer.java:157)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:1436)
at com.jaspersoft.jasperreports.highcharts.charts.ChartPdfHandler.exportElement(ChartPdfHandler.java:43)
... 8 more
Export running time: 1,233!
Executing: rundll32 SHELL32.DLL,ShellExec_RunDLL "H:\QED\Design Specs\JasperReports5\New Reports\report6.pdf"
I'm trying to run a report on Birt web viewer (JBoss) with a parameter and I get the following error:
- Grid (id = 1461):
+ Can not load the report query: 1461. Errors occurred when generating the report document for the report element with ID 1,461. (Element ID:1461)
Reports without parameters are working fine. Reports with parameters are running fine in Eclipse Report Designer.
Could someone give me advice please?
I had same kind a problem (ie. the report was throwing error while tried to fetch from the tomcat web container). To resolve this issue, I have added the database driver in the /WEB-INF/lib folder.
Please try this once and let me know if it works.
I solved my problem opening my report with "preview" instead of "frameset". This shows the real exception.
Might be you have not define id in your report parameter,either in report parameter or data set parameter.
In my case, the datasource for BIRT was not configured correctly. I needed to make sure the JNDI name matched what was in the config for my container.