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

szaharia

Jaspersoft Staff
  • Posts

    16
  • Joined

  • Last visited

 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 szaharia

  1. Hello, We could imagine a solution that uses a subreport: For the additional rows you could use a subreport placed in another report section (for instance, the summary section), depending on your needs. Use a printWhenExpression for this section and set the split type to 'Stretch'. Place the additional query and data in this subreport, that will be printed when the condition in printWhenExpression will be met. Rows will be added in the Excel output, but also in PDF, HTML, etc. Attached is an example that can be run with an empty datasource. I hope this helps, Sanda
  2. Could you post your JRXML sample here? Thanks, Sanda
  3. For all lines in your band, you could enclose in a frame all elements in a given line. For that frame set a printWhenExpression for not null values and also check the Remove Line When Blank flag. Attached is a modified sample that can be tested with an emptydatasource with 10 records. I used a frame only for the first line in this example, but you could apply the same layout to all lines in the band. Regards, Sanda
  4. Hi, Are they 0 values or nulls? Could you post the jrxml file here? Thanks, Sanda
  5. By default, generated sheets come with whitePageBackground property set to true, which will make sheet's content to appear as drawn on a white page. To avoid this behavior you need to use the following setting: configuration.setWhitePageBackground(Boolean.FALSE);[/code]Another way would be to set the following property in your JRXML file, if available: <property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/>[/code]I hope this helps, Sanda
  6. Hi, This also works very well and can be applied by direct editing the JRXML file. Using the Properties --> Advanced tab in JSS generates the same setting in the resulting JRXML. Anyway, upgrading to JR 6.2.1 would be a good idea, since this issue is already fixed there. Thank you, Sanda
  7. The report design looks ok, but it doesn't contain info about the modified structure when using the concat() function. So, in the report that uses concat() make sure that the following modifications were done: <field name="filer_name_last" class="java.lang.String"/> and <field name="filer_name_organization" class="java.lang.String"/> field settings were removed <field name="name" class="java.lang.String"/> field setting was added instead the $F{filer_persent_type_cd}.equals("ENTITY") ? $F{filer_name_organization} : $F{filer_name_last}+", "+$F{filer_name_first} expression was replaced by $F{name}+", "+$F{filer_name_first} I hope this helps, Sanda
  8. Could you post the JRXML file, in this case? Maybe we'll be able to notice some other possible clues there. Thanks, Sanda
  9. Is your report using scriptlets? Usually this error message is raised when a scriptlet tries to access a missing field.
  10. Hello, Try to replace the ORDER and QUANTITY separate columns with a table component. This would require some changes regarding datasets and queries in the report, but gaps in the output will be removed. I hope this helps, Sanda
  11. Hello, Here is a more suitable solution for this problem: instead of using multiple detail bands that may affect the output layout, just place a frame in a group footer band. Inside this frame create five rows with empty elements that preserve the same layout as the populated rows and write a proper print when expression for each empty element. Also write a related print when expression for the entire group footer band. Elements in a frame can be placed beyond its boundaries, and that is an advantage in this case. Attached is a report sample that can be tested using an empty datasource with 1 or many records. Regards, Sanda
  12. Hi, In case of fixed-height rows you could add other 5 detail bands of the same height in your detail section, each of them populated with empty elements (in order to keep the same layout as in the occupied rows) and each of them having a print when expression (assuming the group name is 'category'): $V{category_COUNT} < 1 - for the first band$V{category_COUNT} < 2 - for the second band$V{category_COUNT} < 3 - for the third bandand so onThis solution cannot be applied for rows with variable height, because we don't know the most appropriate height value for the additional bands. In such a case, making use of table component/subreports for each of 3 tables would represent a better approach. I hope this helps, Sanda
  13. Try to export to PDF and see if the output looks good in this case. Also, if possible, please post the JRXML file in order to help us reproduce the issue. Thanks, Sanda
  14. Hi, This output could be obtained based on print when expressions for elements in the detail band and exporter filter by key properties. If you need to print out rows starting from 16, for each element in the detail band you need to place 2 textfields: one having the print when expression $V{REPORT_COUNT} < 16 and key="test" setting, the other having the print when expression $V{REPORT_COUNT} > 15 and no key attribute set. Add these properties in the JRXML file: <property name="net.sf.jasperreports.export.xls.exclude.key.test"/> <property name="net.sf.jasperreports.export.xlsx.exclude.key.test"/> Also, the net.sf.jasperreports.export.xls.remove.empty.space.between.rows property should be set in order to remove the empty rows which are generated instead. I hope this helps, Sanda
  15. Hi, Some useful information about hyperlinks and bookmarks can be found here: http://jasperreports.sourceforge.net/sample.reference/hyperlink/index.html#hyperlinks I hope this helps, Sanda
  16. Hi, Could you post your SQL query text here? Apparently it attempted a division by 0 while running. Thanks, Sanda
  17. Hello, At least one of the problems lays within the curly brackets. Expressions like $F{PRODUCTNUM.split("_")[0]} don't represent valid entities in JasperReports. Try to use $F{PRODUCTNUM}.split("_")[0] instead, and see if the issue still occurs. Also, make sure the PRODUCTNUM field is of type String in order to apply the split() method. And one last thing: make sure the <variable > tag is properly closed (the </variable> closing tag should be also present in your JRXML file after </variableExpression>). I hope this helps, Sanda
  18. Hi, You need to create a local anchor hyperlink in your report: for the element 'B' - set an Anchor Name Expression; make sure this expression is valid (some output formats don't accept spaces, for instance) and generates unique results per report (pay special attention when the element 'B' is placed in a detail band that will repeat itself at runtime)for the element 'A' - set the Hyperlink type attribute to 'LocalAnchor' and choose the same expression for Hyperlink Anchor Expression as in the Anchor Name Expression for the textfield 'B'An example related to hyperlinks in JasperReports is available here. I hope this helps, Sanda
  19. Hi, Make sure the field value is not null, then use a split("_") method for this: ($F{field}.split("_")[0]) I hope this helps, Sanda
  20. Try to run your query in a separate DB first and see if it runs successfully.
  21. Hi, Use a filter expression in your dataset. Regards, Sanda
  22. Hello Ylva, and thank you for the feedback. In case of further needs, here are some guidelines about how to improve/optimize your report design layout in order to obtain an accurate Excel output. Also, attached is a JRXML report layout sample, containing a long title without merge, column headers, detail and column footer. It can be run with a 10-records empty data source. Regards, Sanda
  23. There is no need of extra libraries in this case. Your code block is correct. To avoid wrong results, make sure that 'Ignore Pagination' flag is not set for your report. Also make sure that net.sf.jasperreports.export.xls.one.page.per.sheet = false is not set in your report or in a jasperreports.properties file.
  24. I assume this is because of the width="929" setting. This is quite a large value, enough to produce merged cells if there are other smaller report elements placed below this title. Just set the element width with an appropriate smaller value (for instance, width="100") and see the difference. For a more precise estimate of the element width we need to see the JRXML file, because the Excel export is very sensitive to the report design itself. You'd probably need both to resize the element and place it in a proper position. Regards, Sanda
  25. Hi, If you don't need a detail section to be repeated at runtime, make sure the datasource in the main dataset contains a single record. Try to run the main report using an empty datasource and use subdatasets for your subreports. I hope this helps, Sanda
×
×
  • Create New...