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

mpolo91

Members
  • Posts

    14
  • Joined

  • Last visited

mpolo91's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

0

Reputation

  1. I remove the subreports from the mainreport and embed them again. I also delete the jasper files. Everything in the subreport properties looks exactly than before, but now it works. A bug? I don't know.
  2. Hello, I'am using a mainreport that embedds a subreport and this subreport embedds another subreport. If I run the mainreport I get the error message: net.sf.jasperreports.engine.JRException: Resource not found at: nullsub_subreport.jasper. In the main report I create a parameter $P{SUBREPORT_DIR] that gets the path where the reports are stored. With the subreport properties I passed this parameter to every subreport. In main and subreport the properties looks like this: //mainreport <subreport> <reportElement x="0" y="0" width="1020" height="30" uuid="7c65e51a-a0f1-42c5-bb1c-72510ec9843a"/> <subreportParameter name="Version> <subreportParameterExpression><![CDATA[$P{Version}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subreport.jasper"]]></subreportExpression> </subreport> //subreport <subreport> <reportElement x="-20" y="0" width="1060" height="40" uuid="78b7e08c-63f4-423c-b676-d0d6a93b1da0"/> <subreportParameter name="Version"> <subreportParameterExpression><![CDATA[$P{Version}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "sub_subreport.jasper"]]></subreportExpression> </subreport>[/code]All files be in one flat directory. So I think there should no problem that a subreport imports a subreport.
  3. Hi, I did not use default values, but now after rewriting the sql query it works. We think the problem was a left join in the query, that is now replaced with a subselect. But its strange. Why the old query works correctly in Birt and DBeaver and not in Jaspersoft? With the old query the field value where configured on this way: <field name="Countryname" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="Cityname"/> <property name="com.jaspersoft.studio.field.label" value="Countryname"/> <property name="com.jaspersoft.studio.field.tree.path" value="DATATABLE_NAME"/> </field> <field name="Cityname" class="java.lang.String"> <property name="com.jaspersoft.studio.field.name" value="Cityname"/> <property name="com.jaspersoft.studio.field.label" value="Cityname"/> </field>[/code]
  4. Hi everyone, i had created a Jasperreport that prints the name of a city (f.e. "Munich") and the name of a country (f.e. "Bavaria"). If I run the preview I get the strange error that the program prints for both fields value "Bavaria". So the country name is equal the cityname. I check the SQL query and the data in the database, but there, everything looks correct. If I run the query in a databasemanager, I got the correct values. Also in a corresponding BIRT Report the values are printd correctly. So I think this have to be a problem of Jaspersoft and not problem of the query. I checked the report and only hint I found was, that the field of the cityname is the only field that has no property of name "com.jaspersoft.studio.field.tree.path". Any other fields are mapped to the database table with this property. I added this property, but this did not bring a change. Any ideas why this happened?
  5. I change the calculation type of var_mainreport to System as descriped in the referenced topic, but it changed nothing. The return value is null, but normally 2005 should be printed. I added the xml files. Maybe you can take a look and check whats going wrong?
  6. In this case the equality check with object.equals(object) solves the issue. Like this: `($F{Param1}.equals("1"))`
  7. Hi everybody, I want to use the return value of a subreport into the master report, but the only thing that is shown is "null". I'd done the following: Subreport create variable "var_subreport" of type BigDecimal, Expression 2005, ResetType= None, IncrementType = None Mainreport: create variable "var_mainreport" of type BigDecimal, ResetType = None, IncrementType = None In Mainreport in the subreport element I set up the following: From variable: var_subreport To Variable: var_mainreport Calculation Type: nothing The evaluation time of the text field that displayes the return value is set to Report. I also want to use the value vor a subtraction. So the return value should be substracted from another value. But this also gives null. Any hint to solve this is appreciated!
  8. Hi @rpeguet, what you describe is exactly what I do: Creating a subdataset for a table and adding the parameters like the way you describe it. Actually I use two tables with different datasets. One table is printed correctly, the other one prints values twice. My suspicion is that the sql query produces the twin values. Just two be sure if there is no error with the settings in Jaspersoft, I add the general structure of the report. I'am new to Jaspersoft, it will be nice if someone of you can give me a review.
  9. Hello everyone, I've a problem with the table component in Jaspersoft. I place the table in the title band and with this no data is shown. If I use the "No Data" row of the table I get the information that no data is found. If I remove the table and print the data inside of a random band values are displayed. I found information in this forum that it is necessary to do a parameter mapping if the table is empty. If I do that the the data is shown inside the table, but the curious thing is: the data is displayed twice (please see screenshot). Why did this happen? And how can this be solved? Thank you.
  10. Did no one have an idea how making text for special categories bold can work in jaspersoft?
  11. @mahadiosb As I described above setting the table into the page or column header did not work because JasperSoft restricts the height of the band. But putting the table to the summary band works now.
  12. Hello everybody, I'm using a table component to display a wide range of data. This data is catagorized by ID's and some categories should be displayed with bold text. For example the first row is Category 1 and Category 1 should be printed with bold text. The row of Category 2 than should be formatted with normal style. So there a some single rows in the table that should be printed with bold text. What is the best way to realize that? I try this bit it did not bring a change: ($F{Param1} == "1") ? "<style isBold='true'>" + $F{Param2} + "</style>" : $F{Param2}[/code]Thanks for any hint!
  13. Hello, I'am using a table in JasperSoft that is placed in the detail band. The table is filled with data queried from a database. If I start the preview so in JasperSoft I get a report with more than 20.000 pages. Normally the report should have not more than 80 pages. I have read that a table should not placed in the detail band. If this is fact, what is the correct band for a table? As I can see all header and footer bands a restricted by the height. So it is not possible to place the table there. Also the summary band produces a report with to much pages.
  14. Hello, in Jaspersoft I create a variable of type string that do a simple operation inside a tenary code. ($P{Param1}.length() == 0) ? $V{var_x} : $V{var_x}.length() == 6 ? $V{var_x} + $P{Param2}.toString() : "Error"[/code]In this case var_x represents a string like "01.01.". If true var_x should be concatinated with an int value like 1971. But the return value of the variable is always null. Because I'am new to JasperReports and Jaspersoft I'am not sure if this is a setting inside the software or if the ternary operator is not valid in Jaspersoft. Did someone have a hint for me? Kind regards
×
×
  • Create New...