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

ejhellerattc

Members
  • Posts

    35
  • Joined

  • Last visited

ejhellerattc's Achievements

Contributor

Contributor (5/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. After 10 years, I had an epiphany. The CSV data source was oriented like the table, just transposed: Day1,1,AJBGT,11:00,12:00,ABCDay2,2,KIUJ3,14:00,16:00,DEFDay3,45,P98U,08:00,10:00,GHI Etc. Since I can control the CSV, if I have the data as three columns: Index, DataType and Value, then I can create a CrossTab that does what I need: Day 1, Plan Number, 1Day 1, Action ID, AJBGTDay 1, Start Time, 11:00Day 1, End Time, 12:00Day 1, Supervisor, ABC The CrossTab has COLUMN_0 as the header, COLUMN_1 as the row label and COLUMN_3 as the data (no computation). Modifying the CrossTab to not have Totals for the Groups prevents the Totals column and row from appearing. Not pretty, but it works. Posted for others who may have wondered. Ed.
  2. I have a report that was written several years ago with JasperStudio. It has a couple of parameters that are passed to it. The first is a value for the WHERE clause of the SQL. The second is the SQL statement itself. The queryString is defined by the parameter: <queryString> <![CDATA[$P!{SQL_QUERY}]]> </queryString> The SQL_QUERY parameter is of a form: <parameter name="SQL_QUERY" class="java.lang.String" evaluationTime="Early"> <defaultValueExpression><![CDATA["select <SQL stuff ....> where determination_value = $P{Device}"]]></defaultValueExpression> </parameter> The Device parameter is defined as a simple java.lang.String data type. This report ran fine in JasperStudio where it was developed and does run fine as part of our application using the embedded methods. However, I switched to using the Eclipse add-in to use JDK 11. With the Eclipse IDE, running the report causes SQL Server to generate and error: Caused by" com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'parameter_Device'. My supposition is that the Jasper Add-In is expanding the parameter, but not replacing the parameter with the value of the parameter prior to issuing the SQL statement. I could not find anything similar in the knowledge base. Has this been reported by anyone or addressed in a newer version? Thanks, Edward.
  3. I have reports that use methods defined in external JAR files. As a result of Oracle's license changes, we have moved to OpenJDK 11 for our development and deployment environments. The external JARs are being built with OpenJDK 11, however, when I try to compile the reports, Jaspersoft Studio reports a version mismatch. I tried to change Studio to reference a newer Java version, but can only change to 10. Even at that, the version mismatch is reported. Is there a way to have Studio use the OpenJDK JARs? If not, is there a timetable for support for openJDK 11 in Jaspersoft Studio? Thanks, Edward.
  4. Thanks for the response. Those are sample reports for basic charts. Perhaps a visual description of what I am looking for will help. The data is derived from a JRDataSource, but an equivalent SQL query might look like: select date, time, voltage from ATableOfData order by date, time Essentially, I need to somehow create multiple distinct series' based on grouping using the date value. The number of series can be expected to be variable. Thanks, Edward.
  5. I have a data stream that has three columns: Date, Time, Value. I would like to be able to generate separate lines based on the date. Thus the time axis is a 24 hour period, with separate lines for the values for a given date. I have tried a time series to no avail. I also tried XY Line and Line Charts, setting the values for the Date and Time columns to Integer. I have tried to define a DataSet that groups by the Date value. Is this something that JasperReports can do or I need to redefine the expectations? Thanks, Edward.
  6. I upgraded to 6.2.0 since I was having issues with 6.1.0 and Java 8. After upgrading, when I select Is For Prompting for a parameter (two parameters, both set), IsForPrompting is not shown in the source view and in Preview I am not prompted for the parameters. Has something changed? Thanks, Edward.
  7. There was a feature in iReports to be able to place fields adjacent vertically. It was the same as the current Join Right and Join Left, just in the vertical direction. In addition to the obvious use of getting things to spcae out vertically, it was also useful to take sequential fields and reorient them from horizontal to vertical. What happened to this option? Thanks, Ed.
  8. We recently switched from iReports to Jasper Studio. In iReports, I had a number of preferences set up. For example, links to external JARs and links to various data sources. A number of the data sources are sample CSV files (simulating the files generated during production) that were established with the correct file name and column associations. Since I saved the iReports configuration when I uninstalled, is there a means to import this information into Jasper Studio so that I don't have spend the time to manually locate each entry in the iReport configuration and tediously enter the information into Jasper Studio? Thanks, Edward.
  9. Thanks for the information. I have been trying out this and other processes (in addition to other tasks). In my initial request, I may have misspoke. The data actually comes from a CSV file (sort like a SQL, but not exactly, thus the misspeak). Because it is CSV, it is not possible with JR to perform SQL queries. Since I have control over the CSV format and generation, I suspect that I am going to have to drop back to a kludge. Every Nth record is the row lables. This, with some print whens to do formatting, allows the report to print the row lables. What is not nice about this approach is that the row lables cannot be a different width than the data. Thanks, Ed.
  10. Have you tried to set up the list of subreports and use the PrintWhen option to determine whether to run the subreport based on the field values? Ed.
  11. Sanda, Attached are the files. Report 5 is the master calling Report 4. Noe that the default subreport directory parameter is changed to a generic. Thanks, Ed.
  12. Sanda, Thanks for the response. I tried the PrintWhen. I set up the label to be PrintWhen based on the Report_Count and not print the value when the label is printed. However, this effectively skips a data row. I also tried the PrintWhen to add a label in the left cell above the data, but it just does not look good. I am unclear about your suggestion to resize the columns. Please note that the table shown is a best approximation using the table control in this forum editor tool, not what my report looks like. Thanks, Ed.
  13. Theoretically simple. Generate a table that is oriented horizontally across the page as part of an overall report that is oriented portrait. Report...... Day Number Day 1 Day 2 Day 3 Day 4 Plan Number 1 2 45 32 Action ID AJBGT KIUJ3 P98U LKIU7 Start Time 11:00 14:00 08:00 13:45 End Time 12:00 16:00 10:00 16:00 Supervisor ABC DEF GHI JKL More Report... In the example, there may be 1 plan or 50 plans. The data comes an SQL query and it makes more sense to send the across the page for up to 10 plans per row than down the page for 5 columns of data. In addition, this is the client requested layout. The data part can be done by createing a sub report that uses the space to create multiple columns and placing the data elements vertically oriented in the detail column. The tricky part is how to have labels for the rows displayed to the left of each row of data. Unlike the Horizontal demo report, I do not want to use real estate by duplicating the label in each cell. I tried placing a set of labels to the left of the sub report reference in the main report, however when the data wrapped in the sub report to create a new row of data rows, the labels were not duplicated. Suggestions are appreciaed. Thanks. Ed.
  14. I am generating a report using iReports 4.1.3. I am posting here because I think this is a JasperReports quesiton not a design question. The report will eventually run from an application via the JR library. However, for development purposes, I use iReports. A parameter will be passed in for the SQL query statement. In that statement will be other parameters that need to be substituted. For development purposes, I set the default value of the query as shown in the attached code. My understanding is that parameters are recursively substituted until resolved. So if there are 2 parameters (P1 and P2 ) and P2 is defined based on P1, should I be able to set up the parameter definitions as: <parameter name="P1" class="java.lang.String"/> <parameter name="P2" class="java.lang.String"/> <queryString><!CDATA[$P!{P2}]]</queryString> where P2 is passed in as a string that contains references to P1 (using $P!{p1} )? If I run the code attached, I am prompted for "StartDate", then the diagnostic as shown below is displayed. Thoughts? Thanks, Edward. Code:Error filling print... Error evaluating expression :     Source text : "select det_id as det_id1, min(archive_date) as date_1 from dbo.detector_archive da2 \ where (da2.archive_date >= $P!{StartDate}) \ and (da2.archive_date < $P!{StartDate}+86400000) \ group by det_id \ order by det_id1" net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :     Source text : "select det_id as det_id1, min(archive_date) as date_1 from dbo.detector_archive da2 \ where (da2.archive_date >= $P!{StartDate}) \ and (da2.archive_date < $P!{StartDate}+86400000) \ group by det_id \ order by det_id1"     at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:203)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:591)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:559)     at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:660)     at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:603)     at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1158)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746)     at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:879)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: groovy.lang.MissingPropertyException: No such property: P for class: Test_1323723556036_103013     at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:49)     at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:86)     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:239)     at Test_1323723556036_103013.evaluate(calculator_Test_1323723556036_103013:139)     at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:190)     ... 13 moreÂ
  15. Our reports read data via an SQL query. Some of the values returned are enumeration values. In order to obtain meaningful text for the values, we call methods in an external JAR file (i.e., our application). The methods declare the arguments to be shorts. Appropriately the fields are also declared as shorts (java.lang.Short). In version 3.7.3 and earlier this worked fine. In version 4.0.0, the Groovy compiler complains that there is no method available with an argument of Integer. By adding the method ".shortValue()" to the field in the method call, it works. So: With the field name as: <field name="OPERATIONMODE" class="java.lang.Short"/> This worked in 3.7.3: ...findByValue($F{OPERATIONMODE}).getLongName() But for 4.0.0 it had to be changed to: ...findByValue($F{OPERATIONMODE}.shortValue()).getLongName() Any thoughts as to why or how we can avoid the additional coding? Thanks, Ed.
×
×
  • Create New...