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

bigalex

Members
  • Posts

    75
  • Joined

  • Last visited

bigalex's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

7

Community Answers

  1. Below is the list of properties that can accommodate the report export to excel format. Also, check to make sure all fields on the report are aligned vertically and horizontally and remove any spaces in between including page mergings. <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns"value="true"/> <property name="net.sf.jasperreports.export.xls.ignore.cell.border" value="false"/> <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="pageHeader"/> <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="pageFooter"/> <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.3" value="lastPageFooter"/> <property name="net.sf.jasperreports.export.xlsx.ignore.cell.background" value="true"/> <property name="net.sf.jasperreports.export.xlsx.white.page.background" value="false"/> <property name="net.sf.jasperreports.export.xlsx.ignore.graphics" value="true"/> <property name="net.sf.jasperreports.export.xlsx.detect.cell.type=true"/> <property name="net.sf.jasperreports.export.xlsx.remove.empty.space.between.rows=true"/> <property name="net.sf.jasperreports.export.xlsx.remove.empty.space.between.columns=true"/> <property name="net.sf.jasperreports.export.xlsx.collapse.row.span" value="true"/> <property name="net.sf.jasperreports.export.xlsx.ignore.page.margins=true"/> <property name="net.sf.jasperreports.export.xlsx.one.page.per.sheet=true"/> <property name="net.sf.jasperreports.export.xlsx.wrap.text" value="true"/> <property name="net.sf.jasperreports.export.xls.column.width.ratio" value="1.10f"/> <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/> <property name="net.sf.jasperreports.export.xls.freeze.row" value="2"/> <property name="net.sf.jasperreports.exports.xls.font.size.fix.enabled" value="false"/> <property name="net.sf.jasperreports.export.xls.sheet.names.all" value="Data/Footnotes"/>
  2. ................................................................................................
  3. It looks like the CA-158 error (SAP) is the same as the HTTP 408 error. Check the article: What Is a 408 Request Timeout and How to Fix It (https://www.exai.com/blog/408-request-timeout-error). I hope this helps.
  4. Would you be able to provide the full TEXT error ? Also,check to make sure the sas.Servis and Pocet are not Zero; otherwise, it will be an endless loop in your formula (100/Pocet*sas.Servis). Use NULLIF function - NULLIF(expression1, expression2) to avoid division by zero.
  5. Would you be able to provide the error you see in Jasper? I am just guessing here that Jasper doesn’t like the query line with .object. ( ae.object.objectId) , the error may provide more info on why the query doesn’t work in Jasper.
  6. Use Print When Expression. Please see the example below. Assuming that VAR1 in Field 1 and VAR2 in Field 2, then add expression to Print When Expression: $F{VAR1}!=null will display field 1 when it is not empty. The same for field 2. <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.16.0.final using JasperReports Library version 6.16.0-48579d909b7943b64690c65c71e07e0b80981928 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="2fields" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="8d2657b1-69a0-45dc-95f3-d1f76163e412"> <parameter name="Field1" class="java.lang.String"/> <parameter name="Field2" class="java.lang.String"/> <queryString> <![CDATA[]]> </queryString> <background> <band splitType="Stretch"/> </background> <pageHeader> <band height="81" splitType="Stretch"> <textField evaluationTime="Report"> <reportElement mode="Opaque" x="10" y="8" width="460" height="30" forecolor="#FFFFFF" backcolor="#FA100C" uuid="e7344090-e068-42b3-a60e-1199c653d487"> <printWhenExpression><![CDATA[$P{Field1}!=null]]></printWhenExpression> </reportElement> </textField> <textField evaluationTime="Report"> <reportElement mode="Opaque" x="10" y="40" width="460" height="30" forecolor="#050505" backcolor="#07FAE6" uuid="c81b9400-78e0-4840-964a-ae69d67644c3"> <printWhenExpression><![CDATA[$P{Field2}!=null]]></printWhenExpression> </reportElement> </textField> </band> </pageHeader> </jasperReport>
  7. The only way I know of to have a connection to multiple data sources is to use connection parameter(s). Suggestion is: Use one of the subreports as the main report or at least use the same data source (you can select the data source and then place on the main report query something like- Select 1 from dual ) Create Parameter (i.e., $P{Subreport2_conn}) on the main report to use for connection to the data source in Subreport2:Class: java.sql.ConnectionIs For Promting: UncheckDefault value Expression: java.sql.DriverManager.getConnection("jdbc:oracle:thin:@YourServerIP:YourServerPort/yourdatabase","UserID","Password")Not sure what your drive is; in my case, it is jdbc:oracle:thin Set the Connection Expression in Subreport2 to $P{Subreport2_conn}I was using the same approach to connect five different data sources from one report. I hope this helps.
  8. Have you tried to change the Class Type (i.e. dollar amounts - to java.lang.Double) in JasperStudio Dataset and Query Dialog window?
  9. JasperStudio adds _# to the file name if the same file name exists in derctory. Tip: To stay organized, create a separate folder for each report in JasperSoft Studio (MyReports).
  10. Unfortunately, there is no such chart that exists in JasperStudio. See if the visualization element can help you achieve your goal.
  11. https://yourjasperserver.com/jasperserver/rest/resources/reports?type=reportUnit&recursive=1 You may need to copy and paste it to the notepad++ to remove unwanted tags. Of course, this is not an ideal solution, but you will get list of all reports from the JasperServer.
  12. Try to publish the report again by click on the Publish icon in the Jasper Studio and then point the parameter to the correct resource reference. Tip: Create an Archive folder on the server (with only access by admin role), then copy the folder with the reports you want to update and paste it into Archive. This way, you will have a previous copy of the report for tracking and recovery purposes.
  13. In order to edit queries in Jasper reports you need to install JasperSoft studio and then you will be able to transfer reports from the server ( repository explorer ) to JasperSoft on your computer (Project Explorer).
  14. In order to use "Remove Line When Blank" in Detail band, the whole line must be empty. In your case, there is a Static text filed on the first line. You may try to put all variables in one field and use "n" between the records, however it will required to validate the variable and verify if it is empty or not.
×
×
  • Create New...