Jump to content
We've recently updated our Privacy Statement, available here ×

I am Leo

Members
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    1

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by I am Leo

  1. In my case, I export the reports to 3 PDF under a list of byte[] using JasperExportManager.exportReportToPdf method Then I use PDFMergerUtility library to merge them into one report. The result is a byte[]. You can write it into a file or upload it to S3.
  2. Just put the Locale you want into parameters. REPORT_LOCALE is different from report_locale HashMap<String, Object> parameters = new HashMap<>();parameters.put("REPORT_LOCALE", Locale.JAPAN);[/code]
  3. Check again with your variable Is_Address line 207 in your source code.
  4. That is a Java code editor. Just put the expression is written in java language and it will run correctly.
  5. Your code is wrong. =>> Check the error area and the what are you facing to
  6. Take a look at this example: https://www.geeksforgeeks.org/bigdecimal-subtract-method-in-java-with-examples/
  7. If I were you, I would handle the data into a list of small data that has a max amount is 800,000 in java application. Then pass one by one the processed data in the list and create a PDF for it. Finally, combine them into 1 report.
  8. Somewhere in your input data has met a NullPointerException. Check your input data which you fill in your table in the report template. If you don't know which field causes the exception. Try to remove one by one to find it.
  9. You can use printWhenExpression to show/hide your subreport. <subreport> <reportElement x="26" y="14" width="190" height="17" uuid="285bfacd-4092-4d3a-ac1f-6d72074350ae"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.element.name" value="mySubreport"/> <printWhenExpression><![CDATA[$P{checkoutPointItems} == null || $P{checkoutPointItems}.isEmpty()]]></printWhenExpression> </reportElement> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{checkoutPointItems})]]></dataSourceExpression> <subreportExpression><![CDATA["templates/pdf/subreports/checkout-point-item.jasper"]]></subreportExpression></subreport>[/code]
  10. I believe that you are using the list component instead of the table component. So that, just select any component in the list component to customize it. The second thing, you are using the wrong way to set the backcolor and forecolor. See the example below: <textField> <reportElement x="195" y="264" width="1096" height="80" forecolor="#222222" backcolor="#FF0400" uuid="caac9ec2-ce44-4660-a0a3-32e5e11fc38d"> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> </reportElement> <textFieldExpression><![CDATA["Look at the forecolor and backcolor setting."]]></textFieldExpression> </textField>[/code]
  11. Follow your logic, I rewrite it in order to read easily. Try the below code to apply to your report template: $F{COLUMN_58} != null && !($F{COLUMN_58}.trim().isEmpty()) ? "JJ# " + $F{COLUMN_58} : ($F{COLUMN_59} != null && !($F{COLUMN_59}.trim().isEmpty()) ? "DC# " + $F{COLUMN_59 : " ")
  12. $V{PAGE_NUMBER}.intValue() == 1 ? "" : ("".equals($P(titel)) ? "test" : $P(titel))
  13. Click on the Text Field and you can find the Text Adjust property here. https://community.jaspersoft.com/sites/default/files/user_uploads/I%20am%20Leo/capture.png
  14. Base on my experience, just fix the result after generated from your java application. The PDF-preview in the studio is not reliable.
  15. Have you tried to set the padding of the text field to 0? And try to using textAdjust="ScaleFont" in your text field.
  16. What is the error that the console tell you?
  17. It's blank because you haven't config the correct font for your text base on the language. If you are using java application and use Jasper to create a report template, I will show you how to config the font for your report in the java application.
  18. The type of the result of $F{COLUMN_7}.substring(0,5) is a String. You can not use a String as a condition in ternary. You have to use Boolean. Example: check the string is 0000 "0000".equals($F{COLUMN_7}.substring(0,5).strim())
  19. Q: Is it possible to display tabular data (of variable length) using only parameters? A: Sure. I am developing a java application using a template created by Jasper Studio. I only use parameters to fill the data to my report. I will the basic way how to display a table of data in your report. Firstly, put or data to the parameters map. HashMap<String, Object> parameters = new HashMap<>();parameters.put("myList", yourDataList);[/code]Secondly, define a subDataset in your template. Your subDataset should map with your Object in your data list to display correctly. <subDataset name="myListItem" uuid="bc2619a3-a304-4ce0-b488-b8ed5c8c9dbc"> <queryString> <![CDATA[]]> </queryString> <field name="field1" class="java.lang.String"/> <field name="field2" class="java.lang.String"/> <field name="field3" class="java.lang.String"/></subDataset>[/code]Last, using the subDataset and your parameter in the table component: <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <datasetRun subDataset="myListItem" uuid="333083d2-f5aa-471b-abe5-80f818b5fa3a"> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{myList})]]></dataSourceExpression> </datasetRun> <jr:column width="240" uuid="ff083ae3-db88-42c0-af83-279fa11028e1"> <jr:columnHeader height="15"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <textField textAdjust="StretchHeight"> <reportElement x="0" y="0" width="240" height="15" uuid="b31e167a-648e-482b-8d4e-9e41ad642176"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textFieldExpression><![CDATA["Your header"]]></textFieldExpression> </textField> </jr:columnHeader> <jr:detailCell height="15"> <textField textAdjust="StretchHeight"> <reportElement x="0" y="0" width="240" height="15" uuid="07a700ff-0166-4f3c-b68f-225893e10464"> </reportElement> <textFieldExpression><![CDATA[$F{field1}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> ...</jr:table>[/code]
  20. Did you add the custom font that you mentioned to your java application?
  21. <textField textAdjust="ScaleFont"> <reportElement x="0" y="0" width="1520" height="15" uuid="6cb61704-2f0a-4b05-b714-f0219175f001"> <property name="com.jaspersoft.studio.element.name" value="content"/> </reportElement> <box topPadding="35" leftPadding="35" bottomPadding="35" rightPadding="35"/> <textFieldExpression><![CDATA[$F{point4}]]></textFieldExpression></textField>[/code]Just use textAdjust="ScaleFont" in your text field.
×
×
  • Create New...