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

drummer54

Members
  • Posts

    91
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by drummer54

  1. Can anyone tell me what's wrong with the conditional style code below? Style definition: <style name="Style1" mode="Opaque" forecolor="#000000" backcolor="#FFFFFF"> <conditionalStyle> <conditionExpression><![CDATA[$F{description2} == "Percentage Improvement"]]></conditionExpression> <style mode="Opaque" forecolor="#000000" backcolor="#DCE6F1"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$F{description2} != "Percentage Improvement"]]></conditionExpression> <style mode="Opaque" forecolor="#000000"/> </conditionalStyle> </style> Text field definition using conditional style defined above: <textField pattern=""> <reportElement style="Style1" mode="Opaque" x="444" y="7" width="69" height="48" uuid="14c428e7-5078-41fc-833e-3868937c596d"> <printWhenExpression><![CDATA[$F{description2} != "Percentage Improvement"]]></printWhenExpression> </reportElement> <textElement textAlignment="Center" verticalAlignment="Bottom" markup="html"> <font fontName="Arial" size="9" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$F{description2} + "<br>Individual Requirements"]]></textFieldExpression> </textField> No matter what the value of $F{description2} the background color is white.
  2. I'm using some existing SQL to create a report in JR 5.5.1 and sorting on 3 fields called company, region and location. The SQL calculates subtotals and totals and counts on these lines being listed in the correct order by using leading spaces before company name, region name and location name and the report total line being identified by 'Report Total' in the company and region fields with no leading spaces. This works fine in SQL Server Reporting Services. However, in Jasper Reports, if the company name starts, for example, with an 'S', the report total line prints ahead of the company detail. The only explanation for this that I can determine is that the leading spaces are being trimmed before sorting. I've attached the jrxml file with the SQL edited to included only the pertinent code and also an Excel spreadsheet with data as returned from the query.
  3. I'm trying to pass 2 parameters to a SQL Server function in a SQL join: join reports.dbo.get_data($P{uid}, $P{rid}) The first parameter displays this error: missing 'ON' at '(' The second parameter displays this error: no viable alternative at input '$P{rid}' Also getting "missing EOF at '('" in the order by clause on this line: rtrim(e.LastName + ', ' + e.FirstName + ' ' + ISNULL(e.middlename, '')) I'm guessing it's something to do with the driver but, as is usually the case, can find no help.
  4. Turns out the problem was my lack of familiarity with Java, which I've used very little and over 10 years ago. Here is how I had the field value defined, which returned true rather than the expected false: ($F{license_number} != "" ? $F{license_number} + " / " + $F{issue_state} : " / " + $F{issue_state}) Changing it to the following caused it to work correctly. (!"".equals($F{license_number}) ? $F{license_number} + " / " + $F{issue_state} : " / " + $F{issue_state}) After doing this the designer wouldn't allow me to change the Markup back to none - the dropdown was empty. I had to edit the source. One of several bugs I've found with Studio. It would also be nice if I could do a right-click/copy within the expression editor but I guess that's something for another day.
  5. Thanks for the response. I'm viewing the report in the JasperSoft Studio Preview pane. The leading spaces are also trimmed when the report is exported to PDF. I'm new to Jasper Reports and I noticed the Markup HTML option but honestly have grown a little weary of experimenting when it would be nice if these types of things were better documented (and that goes for most of today's software & what passes for documentation; I'm not just picking on this product). I'll give that a try. Thanks.
  6. How can I force leading spaces in a text field? I have a report with a field for license number & state, displayed in this format: 123456789 / LA If the individual for whom the report is being run for doesn't have this information, we want it to be printed like this: / providing room for manual entry of the license number before the slash. However, what I get is this: / The expression I'm using is: ($F{license_number} != "" ? $F{license_number} + " / " + $F{issue_state} : " /" + $F{issue_state}) We are using JasperSoft Studio 5.5.1
  7. I'm having the same problem, with a date field in a MySQL database. I filtered out the null values to determine if that was the problem but am still getting the error. In MySQLWorkbench an example of a value in the problem field is '1962-06-03'. Why would that be a problem for JasperReports?
×
×
  • Create New...