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

Domenico Donofrio

Jaspersoft Staff
  • Posts

  • Joined

  • Last visited

Domenico Donofrio's Achievements


Rookie (2/14)

  • Dedicated Rare
  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done

Recent Badges



  1. This short video will show you how to use an Ad Hoc Topic that can be created by following the instructions here. It shows how to introduce a parameter in the Ad Hoc Topic and leverage it when creating an Ad Hoc View to select only the needed and meaningful data in order to limit the database response time and speed up the Ad Hoc View creation and execution. In this way, the data retrieved from the Database will be limited to the result set of the Ad Hoc Topic SQL query, and the management of the data loaded into memory will be less onerous and more efficient. This is a more efficient alternative that will only require the values initially requested in the topic parameter, as an alternative to using filters created directly on an Ad Hoc View which will require loading the entire result set into memory. GMT20240418-141505_Clip_Domenico D'Onofrio's Clip Apr 18, 2024.mp4
  2. Scenario: You want to use a report that can run independently or be included in a report book or else in another report as sub-report. Suppose you want to make some changes to this report. Using the following technique it will be possible to modify only the .jrxml file and the changes will be propagated: - To the report that runs independently depending on the .jrxml file. - To the Book that contains the same report, or else to any master report which embeds the report as sub-report. To upload a report jrxml file in JasperReport Server, access the repository view and: 1: Right click on any directory where you want to save the file. 2:- Click on "Add resource" then "File" and then "JRXML", select the . jrxml file and give any name. After doing that, you can create a new report i.e. in the same directorywhere you uploaded the jrxml file. To do that, from Repository view: 1: Right click on the directory where you want to create the new report. 2: Click on "Add resource" then "JasperReport" 3: As it is shown in the following screenshot, select the JRXML file from the repository by using its assigned repository's path. 4: Set the needed Data Source for the report to run, then click on submit. The first part is done, you have a jrxml file and a Report Unit depending on it. You can now define a report Book that embeds the same jrxml as report. (Or else a master reports that embeds it as sub-report). In both cases, when creating the book, you can reference directly the jrxml file that is on the server and that you uploaded first. To do that, when creating the Book on Jasper Studio, you can include the content from the jrmxl file by setting its repository's path in the Component Expression, i.e. "/public/report". The same thing can be done when including the jrxml as a subreport. Save the Book and publish it on the JasperReports Server. Finally, you will have defined a Jasper Report and a Book (or a master report) that embeds the same jrxml file. Each time a modification is performed on this file, it will be visible both on the Jasper Report and in the Book itself being the same file referenced by the 2 containers. At scale, you can have multiple embedding containers (Jasper Reports, report Book, master reports), that embeds a jrxml and each modification performed to that single file will be propagated to them.
  3. Hello anhttn1909, please consider including the 3 reports in a report book
  4. Hello Bharathwajan, please find in attachment a table that is using the json as datasource. I have only modified the second row to show that is a different record. The Dataset1 used by the table is holding the link with the Json_data_adapter.jrdax that uses the Json file. json_table.zip
  5. Hello, UnknownHostException typically indicates that there was a DNS resolution failure. Please verify your DNS settings and check again
  6. Hello, did you have selected the option for the Text Fields "Blank when null" for this specific report?
  7. Hello raja, for version 8, repository.search.actions.js is in jasperserver-ui\ce\jrs-ui\src\repository folder. jobModel.js is in jasperserver-ui\ce\jrs-ui\src\scheduler\model Also please refer to this Dr Jaspersoft session to know how to apply UI customizations since version 8 by using Webpack
  8. Hello, please look at this example I have created staring from your. You can see how the text field in detail band is stretching to correctly adapt to the hardcoded long text. Hope it helps OverflowIssue.jrxml
  9. Hello joox, would it be possible for you to attach the jrxml for me to have a look?
  10. Hello Ravi, I think you can achieve something similar by customizing the ReportExecutionJob.java class. Hope it helps, Domenico
  11. Hey cmoon, take a look at this sample, where I built a group city within a group country that is using the sample DB. I have added a group header for both. You can start from this sample and modify it to adapt to your case, also notice how the sql must return ordered result. Hope it helps. <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 8.2.0.final using JasperReports Library version 6.20.3-415f9428cffdb6805c6f85bbb29ebaf18813a2ab --> <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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c9e1b20f-8319-4047-8846-5208e2e54c3a"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <queryString> <![CDATA[select * from orders order by shipcountry, shipcity]]> </queryString> <field name="ORDERID" class="java.lang.Integer"> <property name="com.jaspersoft.studio.field.name" value="ORDERID"/> <property name="com.jaspersoft.studio.field.label" value="ORDERID"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="CUSTOMERID" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="CUSTOMERID"/> <property name="com.jaspersoft.studio.field.label" value="CUSTOMERID"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="EMPLOYEEID" class="java.lang.Integer"> <property name="com.jaspersoft.studio.field.name" value="EMPLOYEEID"/> <property name="com.jaspersoft.studio.field.label" value="EMPLOYEEID"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="ORDERDATE" class="java.sql.Timestamp"> <property name="com.jaspersoft.studio.field.name" value="ORDERDATE"/> <property name="com.jaspersoft.studio.field.label" value="ORDERDATE"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="REQUIREDDATE" class="java.sql.Timestamp"> <property name="com.jaspersoft.studio.field.name" value="REQUIREDDATE"/> <property name="com.jaspersoft.studio.field.label" value="REQUIREDDATE"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPPEDDATE" class="java.sql.Timestamp"> <property name="com.jaspersoft.studio.field.name" value="SHIPPEDDATE"/> <property name="com.jaspersoft.studio.field.label" value="SHIPPEDDATE"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPVIA" class="java.lang.Integer"> <property name="com.jaspersoft.studio.field.name" value="SHIPVIA"/> <property name="com.jaspersoft.studio.field.label" value="SHIPVIA"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="FREIGHT" class="java.math.BigDecimal"> <property name="com.jaspersoft.studio.field.name" value="FREIGHT"/> <property name="com.jaspersoft.studio.field.label" value="FREIGHT"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPNAME" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="SHIPNAME"/> <property name="com.jaspersoft.studio.field.label" value="SHIPNAME"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPADDRESS" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="SHIPADDRESS"/> <property name="com.jaspersoft.studio.field.label" value="SHIPADDRESS"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPCITY" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="SHIPCITY"/> <property name="com.jaspersoft.studio.field.label" value="SHIPCITY"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPREGION" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="SHIPREGION"/> <property name="com.jaspersoft.studio.field.label" value="SHIPREGION"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPPOSTALCODE" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="SHIPPOSTALCODE"/> <property name="com.jaspersoft.studio.field.label" value="SHIPPOSTALCODE"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="SHIPCOUNTRY" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="SHIPCOUNTRY"/> <property name="com.jaspersoft.studio.field.label" value="SHIPCOUNTRY"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <group name="GroupCountry"> <groupExpression><![CDATA[$F{SHIPCOUNTRY}]]></groupExpression> <groupHeader> <band height="50"> <textField> <reportElement x="220" y="14" width="100" height="30" uuid="c52201d9-2143-4ffe-b2bc-3c63a7501304"/> <textFieldExpression><![CDATA[$F{SHIPCOUNTRY}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="50"/> </groupFooter> </group> <group name="Group City"> <groupExpression><![CDATA[$F{SHIPCITY}]]></groupExpression> <groupHeader> <band height="50"> <textField> <reportElement x="220" y="10" width="100" height="30" uuid="805a81de-a3a1-4014-bb03-2ca836c2cbb4"/> <textFieldExpression><![CDATA[$F{SHIPCITY}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="50"/> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="30" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="95" height="30" uuid="b36ce90d-7321-4497-96e5-18625e067e36"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="103b9571-fbf4-4a6e-8ef0-45052048d9ab"/> </reportElement> <text><![CDATA[ORDERID]]></text> </staticText> <staticText> <reportElement x="95" y="0" width="92" height="30" uuid="6ad15c93-1406-4d78-a5d1-6847e855ad52"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="0c1caf7f-101d-4d46-9dfc-824fc66d0411"/> </reportElement> <text><![CDATA[ORDERDATE]]></text> </staticText> <staticText> <reportElement x="187" y="0" width="92" height="30" uuid="3d077b3e-d4a6-43b0-98d1-0bd5f03e18ee"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="fb04f75a-c93e-4766-9dac-97628630a87b"/> </reportElement> <text><![CDATA[SHIPPEDDATE]]></text> </staticText> <staticText> <reportElement x="279" y="0" width="92" height="30" uuid="69692d7d-3f2d-452d-9cbe-94e089ceaaab"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="2ee2dd96-7fdd-4e9f-b9d2-4117f7108b9d"/> </reportElement> <text><![CDATA[SHIPCITY]]></text> </staticText> <staticText> <reportElement x="371" y="0" width="92" height="30" uuid="ddd61149-20e3-4378-851f-e0e00bcd4847"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="6737e27e-de0e-47c8-a75d-55eccf0433a8"/> </reportElement> <text><![CDATA[SHIPREGION]]></text> </staticText> <staticText> <reportElement x="463" y="0" width="92" height="30" uuid="922fdf7b-1103-4d2c-acd5-dd62713c9bb4"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="a1f0cecf-ab66-4b7b-adb4-fde81ad696f7"/> </reportElement> <text><![CDATA[SHIPCOUNTRY]]></text> </staticText> </band> </columnHeader> <detail> <band height="30" splitType="Stretch"> <textField> <reportElement x="0" y="0" width="95" height="30" uuid="1ae7576e-1307-4d16-ae41-843f7d51a590"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="103b9571-fbf4-4a6e-8ef0-45052048d9ab"/> </reportElement> <textFieldExpression><![CDATA[$F{ORDERID}]]></textFieldExpression> </textField> <textField> <reportElement x="95" y="0" width="92" height="30" uuid="b974bf12-ab1f-4747-b3b9-05311308524d"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="0c1caf7f-101d-4d46-9dfc-824fc66d0411"/> </reportElement> <textFieldExpression><![CDATA[$F{ORDERDATE}]]></textFieldExpression> </textField> <textField> <reportElement x="187" y="0" width="92" height="30" uuid="0916bb73-b4ff-42f0-9c0d-bfd7ab846eb4"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="fb04f75a-c93e-4766-9dac-97628630a87b"/> </reportElement> <textFieldExpression><![CDATA[$F{SHIPPEDDATE}]]></textFieldExpression> </textField> <textField> <reportElement x="279" y="0" width="92" height="30" uuid="93faa7f7-2f71-4088-852d-293fca01f8cc"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="2ee2dd96-7fdd-4e9f-b9d2-4117f7108b9d"/> </reportElement> <textFieldExpression><![CDATA[$F{SHIPCITY}]]></textFieldExpression> </textField> <textField> <reportElement x="371" y="0" width="92" height="30" uuid="f61aa1d5-7925-45f8-bbea-749d5d9163bd"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="6737e27e-de0e-47c8-a75d-55eccf0433a8"/> </reportElement> <textFieldExpression><![CDATA[$F{SHIPREGION}]]></textFieldExpression> </textField> <textField> <reportElement x="463" y="0" width="92" height="30" uuid="6edfa78c-0522-4fa8-ae93-653706178079"> <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="a1f0cecf-ab66-4b7b-adb4-fde81ad696f7"/> </reportElement> <textFieldExpression><![CDATA[$F{SHIPCOUNTRY}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary> </jasperReport>
  12. Hello agostinho, in any jasper report there is the bundled variable $V{PAGE_NUMBER} that can be used to track page numbers. Specifically: You can set the $V{PAGE_NUMBER}'s print when expression to "REPORT" when you have to display total pages and, $V{PAGE_NUMBER}'s print when expression to "NOW" when you have to display current page number.
  13. Hello karan, the freshData is used in combination with DataSnapshot feature to speed up report execution, so if you don't have these last ones enabled, this parameter is not getting considered. More information about datasnapshot here: https://www.youtube.com/watch?v=F_aApuTBwDQ Also there have been several changes on version 8 with regards to version 7.9 on the UI, so that's why you are observing chunks being loaded, but this is expected. Can I also ask how you are embedding Jasper?
  14. Hello, in order to get a job status you can use the following API: /rest_v2/jobs/<jobID>/state/ It will return the state descriptor of the job, for example: <state> <nextFireTime>2022-03-29T18:01:00-07:00</nextFireTime> <previousFireTime>2022-03-28T18:01:00-07:00</previousFireTime> <value>NORMAL</value> </state> Hope it helps
  15. Hello consultorfran, Para exportar a Word o PDF sin valores puedes crear una copia del report y eliminar del mismo los parámetros (los que empiezan por $P) y los campos (los que empiezan por $F). Ejecute el informe que luego dará un resultado vacío y luego podrá exportarlo al formato deseado. Espero haber sido útil.
  • Create New...