Jump to content
Changes to the Jaspersoft community edition download ×

jgust

Members
  • Posts

    200
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jgust's Achievements

  1. Raphaël is correct about an XML comment line indicating the JSS and JRL used to create the file but you must look at that line using a text editor that is not Jasper Studio. The reason is that Jasper Studio will update that comment as it opens the file skewing the results. I verified this by opening a 6.14.0 file in a 6.20.6 studio and then looked at the source. Comment in text editor <!-- Created with Jaspersoft Studio version 6.14.0.final using JasperReports Library version 6.14.0-2ab0d8625be255bf609c78e1181801213e51db8f --> After opening on 6.20.6 Studio and looking at the source tab <!-- Created with Jaspersoft Studio version 6.20.6.final using JasperReports Library version 6.20.6-5c96b6aa8a39ac1dc6b6bea4b81168e16dd39231 -->
  2. Update 2023-Dec-28, the company decided not to move forward with the homegrown solution and instead use a 3rd party to do the lion's share of the conversion. They were wonderful. The developer who wrote the conversion tool left and we do not have that source since it never became a supported project.
  3. We had this same issue where our sub-report path would change depending on what environment the report was executed for. Our solution was to write a scriptlet that read a configuration file. We would pass the application to it and in return, it would pass back the full path to the location of the report being executed. Here is an example of our development configuration file: # Modify the JASPER_SUBREPORT_PATH to identify where # japer will look for the sub reports # #files on server JASPER_SUBREPORT_PATH=\\\\server\\project\\DEV\\%APP%\\REPORTS\\TEMPLATES\\ Here is an example of our sub-report expression: $P{JasperUtils_SCRIPTLET}.getSubReportPath( "OCR" )+"AAA3-555-001-1295-PDF-SUB01.jasper" The result of that expression using the development configuration previously mentioned would be: \\server\project\DEV\OCR\REPORTS\TEMPLATES\AAA3-555-001-1295-PDF-SUB01.jasper
  4. Yes, variables can be used inside of other variables. Below is an example where I use three different variables in my $V{Campus Header} variable. I believe the issue you are running into is trying to do a direct translation between Crystal and Jasper. You have to work within the reports' defined expression language. You have three built-in options to choose from (java, groovy, and javascript). You can enhance the report engine to add more. You can get more info about that in JasperReports-Ultimate-Guide-3.pdf
  5. 100%, the issue is with the $p!{} parameters. I recommend temporarily removing them and putting valid hard-coded values in their place. Once you have a working version add one $p!{} and make sure it works before moving on. Do this for all three parameters. By the end, you should have a working report.
  6. I don't believe there is a way to determine height based on content. When I was making statements/invoices for customers in Asia and Europe I would put the address in multiple bands due to the issue you are running into. To do that I would make sure NOT to use the page header but instead use a group header to display the address. With the address in the group header, you can have multiple bands each one displaying an address part. GH_1a (name) GH_1b (street) GH_1c (city, principal subdivision) GH_1d (country) If the address belongs to the same country that is sending the document then you can suppress that band.
  7. Please see the sample reference: JasperReports - Styled Text Sample (version 6.20.5) https://jasperreports.sourceforge.net/sample.reference/styledtext/index.html
  8. >> I need to do the recursion from the start date to the end date. Example: >> 2023-06-21 (Initial Date)>> 2023-06-25 (End Date)>> I need to create a table containing:>> 2023-06-21>> 2023-06-22>> 2023-06-23>> 2023-06-24>> 2023-06-25 In Oracle, I would use "CONNECT BY LEVEL" to assist in creating fake rows SELECT extract(YEAR from SYSDATE) - LEVEL + 3 yrFROM DUALCONNECT BY LEVEL <= 7;SELECT trunc(SYSDATE) - LEVEL + 3 dtFROM DUALCONNECT BY LEVEL <= 7;[/code] I'm sure other databases have a similar ability. Another approach and more general would be to create a CTE with a cross join. In the example below fake_rows returns 100 rows. That is then used in MyDate to increment the date. Works great for when I need to create a By Date revenue report and enforce a row for when there is no data on the given date. with fake_rows as ( select a.fr, row_number() over (order by a.fr) as rn from ( SELECT 1 AS fr from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual ) a cross join ( SELECT 1 AS fr from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual UNION ALL SELECT 1 from dual ) b), MyDate as ( select sysdate, sysdate + fr.RN as dt, rn from fake_rows fr)select * from mydate;[/code]
  9. From: https://community.jaspersoft.com/sites/default/files/docs/js-jss_8.2.0_user-guide_0.pdf The file you are looking for is located in the Jasper Studio installation folder. If you are using the community version it would be "Jaspersoft Studio.ini".
  10. From: https://community.jaspersoft.com/sites/default/files/docs/js-jss_8.2.0_user-guide_0.pdf The file you are looking for is located in the Jasper Studio installation folder. If you are using the community version it would be "Jaspersoft Studio.ini".
  11. I ran into the exact same warning when installing Jasper Server 8.2.0 on a fresh PC with JAVA_HOME set to Oracle JDK 17.0.7 (latest version). In an attempt to get around this I uninstalled JS then tried downgrading to JS 8.1.1 still with JAVA_HOME set to Oracle JDK 17.0.7 (latest version). This time it installed successfully without any warnings. Problem is I want to to use JS 8.2.0 and JDK 17. So I uninstalled both. Finally I installed JS 8.2.0 but this time set JAVA_HOME to Oracle JDK 11.0.18 (latest version). It installed without issue. I then stop services uninstalled JDK 11 then reinstalled JDK 17 and set my JAVA_HOME to it. After that rebooted. Now I have JS 8.2.0 and JDK 17. I'll now be able to evaluate it for work. My question is why is there a warning when JDK 17 is supported? Another strange thing I saw in that warning was it trying to use git. I'm not on a development machine so I don't have it installed.
  12. The version number between the server, library, and studio are not in sync. For Library and Studio v6.20.5 is the latest which was released in May 2023. The server v8.2.0 is also the latest and also released in early May 2023.
  13. The database can return a delimited string of values for a specified field. In Oracle, my solution would be to use the ListAGG() function. with mydataset as ( select 'row1.1' as Col1, 'row2.1' as Col2 from dual union all select 'row1.2', 'row2.2' from dual union all select 'row1.3', 'row2.3' from dual)select '"'||listagg(col1,',')||'"' as CSV_Valuesfrom mydatasetunion allselect '"'||listagg(col2,',')||'"'from mydataset;[/code] Oracle & DB2SELECT FieldA , LISTAGG(FieldB, ',') WITHIN GROUP (ORDER BY FieldB) AS FieldBs FROM TableName GROUP BY FieldA ORDER BY FieldA; MySQLSELECT FieldA , GROUP_CONCAT(FieldB ORDER BY FieldB SEPARATOR ',') AS FieldBs FROM TableName GROUP BY FieldA ORDER BY FieldA; PostgreSQLSELECT FieldA , STRING_AGG(FieldB, ',' ORDER BY FieldB) AS FieldBs FROM TableName GROUP BY FieldA ORDER BY FieldA; SQL ServerSQL Server ≥ 2017 & Azure SQL SELECT FieldA , STRING_AGG(FieldB, ',') WITHIN GROUP (ORDER BY FieldB) AS FieldBs FROM TableName GROUP BY FieldA ORDER BY FieldA; SQL Server ≤ 2016 (CTE included to encourage the DRY principle) WITH CTE_TableName AS ( SELECT FieldA, FieldB FROM TableName)SELECT t0.FieldA , STUFF(( SELECT ',' + t1.FieldB FROM CTE_TableName t1 WHERE t1.FieldA = t0.FieldA ORDER BY t1.FieldB FOR XML PATH('')), 1, LEN(','), '') AS FieldBs FROM CTE_TableName t0 GROUP BY t0.FieldA ORDER BY FieldA; SQLiteOrdering requires a CTE or subquery WITH CTE_TableName AS ( SELECT FieldA, FieldB FROM TableName ORDER BY FieldA, FieldB)SELECT FieldA , GROUP_CONCAT(FieldB, ',') AS FieldBs FROM CTE_TableName GROUP BY FieldA ORDER BY FieldA;
  14. If "dbo.actionplan.actionplanid" is allowed to be null then you must change the join condition on "dbo.actionplan" to be an OUTER JOIN. It is the INNER JOIN to that table that is causing nothing to be returned when there is no "dbo.actionplan.actionplanid". SELECT dbo.incident.incidentid , dbo.incident.incidentdesc , dbo.incident.incidenttype , dbo.incident.incidentstatus , dbo.incident.incidentdt , dbo.incident.reportedby , dbo.incident.rootcause , dbo.incident.triage , dbo.incident.departmentid , dbo.incidentfind.incidentfinddesc , dbo.incidentfind.investigationlog , dbo.incidentfind.u_response , dbo.incidentfind.u_findinggroup , (select refdisplayvalue from refvalue where reftypeid= 'Findinggroup' and refvalueid=incidentfind.u_findinggroup) as reftypedisplay , dbo.incident.explanation , dbo.incident.standardreference , dbo.incident.riskdone , dbo.incident.risknotdone , dbo.incident.locationid , dbo.LV_Query_GetLocPathLabel(incident.locationid,' / ',null) as LocPathLabel , dbo.incident.expirationdt , dbo.incident.u_timepoint , dbo.incident.incidentauditby , dbo.incident.incidentauditdt , dbo.incident.incidentauditreference , dbo.incident.severity , dbo.incident.notes , dbo.actionplan.actionplanid FROM dbo.incidentfind INNER JOIN dbo.incident ON dbo.incident.incidentid = dbo.incidentfind.incidentid LEFT OUTER JOIN dbo.actionplan ON dbo.actionplan.incidentid = dbo.incident.incidentidWHERE dbo.incident.incidentid = $P{incidentid}[/code]If you still would like for actionplanid to return "NA" when null then I suggest looking up the ANSI SQL standard for COALESCE().
  15. Move your code into a stored procedure then use a data adapter with plsql language. That plsql language is not just for Oracle but it works on sql server too. When you change the SQL language a new default parameter is created as $P{ORACLE_REF_CURSOR} which holds the result of the procedure. Here is an example of how to call a stored procedure: { call SP_RPT_PDM2_101_004_2023($P{PS_M_ACAD_YR},$P{PS_M_COLL_NAME},$P{PS_M_SUBM_NUM},$P{PS_M_ORG_ID},$P{ORACLE_REF_CURSOR}) }[/code]
×
×
  • Create New...