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

cmatthews

Members
  • Posts

    57
  • 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 cmatthews

  1. It is possible to do almost whatever you want and paramterize the SQL in any sort of advanced ways. I have some reports where I let the user choose the aggregate function type like SUM/AVG/COUNT/MIN/MAX on value results. You still pass the parameter through jasper to the SQL in the same way just set the parameter before report generation. Something like this, select date_format( closed_on, '$P!{myDateLogic}' ) as period, count(case_id) as number from cases where closed_on >= $P!{from_date} and closed_on <= $P!{to_date} group by period order by period; Whenever you use paramters in the query they must have the "!", then they will be replaced by whatever the parameter contains prior to passing the query onto the data provider. You really can get away with doing a lot of cool and powerful stuff this way. Good luck, Clark
  2. Is this query in a subreport, maybe "Using Cache" is enabled? Does it work (return the columns) with a simple "Read Fields" inside the report designer environment? If you just select that column only from the table in the a new report as a test does it work? Seems like the report connection doesn't recognize the referenced column, just trying to give some ideas on how to try and find the problem.. good luck.
  3. I try to stick with relative pathing, you need to make sure the subreport you define is type " .jasper " ... The compiled version of a report. The subreport expression should look something like this, $P{SUBREPORT_DIR} + "SubReportSample.jasper" The default of the SUBREPORT_DIR parameter could be set as " ./ " (no spaces) Commonly (for me) the connection type of the subreport object would be set to "Use a connection expression" and the connection expression would be set to $P{REPORT_CONNECTION} All of those errors seem to be path related, jasper unable to locate the objects you are referencing. Easiest thing to just try and get it rolling is stick everything in the same path at first, change all the paths to relative definition " ./ " and then see how it goes. Try moving things into a more organized structure after you see it work, like put all the images into an images folder then refer to the path " ./IMAGES/ " + IMAGENAME Hope this helps some, if you would like additional assistance feel free to upload your templates. Clark
  4. Sample, SELECT A.Name, A.Age, A.Salary, B.Phone FROM dbo.NameAgeAndSalaryTable as A LEFT OUTER JOIN dbo.PhoneTable as B ON a.ID = b.ID This will return everything from table A and include phone numbers from table B where they are present. If you want to have the phone number have some default if no phone number is present, something like this (in SQL Server), the isnull/ifnull or whatever is very DB engine specific but this works for SQL Server, SELECT A.Name, A.Age, A.Salary, ISNULL(B.Phone,'000-000-0000') as Phone FROM dbo.NameAgeAndSalaryTable as A LEFT OUTER JOIN dbo.PhoneTable as B ON a.ID = b.ID Hope this helps, Clark
  5. When you are using reports without any data query at all there is a setting called "When No Data", you access this in the properties of the main report items in the report inspector. I set your parent reports to "When No Data = All Sections, No Detail", and your subreport to "When No Data = No Data". Moved your subreport definition to the column header band. Moved your fields in the sub report to the "No Data" section. Also changed your connection type to "Don't Pass Data", but don't be confused this has nothing to do with why your setup wasn't working. Anyway take a look at the updated templates, should help you understand. Paramters don't need any additional special mapping or configuration, if you define them in the subreport parameter map then they will be passed into the sub report. Hope this helps, Clark
  6. We have a web reporting project where this was an issue, this solution may not work for you but it worked fine for us because our IT department forces everyone to use internet explorer. Our report output is thrown into an iFrame, in IE there is a style attribute style="zoom:125%". We also hooked this attribute to a slider in order to allow the user to control the zoom level. Hope this helps. The only side effect that we experienced is that the scroll bars also resize, but thats really no biggie... Clark
  7. Use styles, assign the styles to all the items in the row and conjoin the sides of the column items. Assign the style to all the items in the row and set the items in the row to use styled text. Here is a sample of the style that works for me and for HTML output. Code: <conditionalStyle> <conditionExpression><![CDATA[new Boolean( $V{REPORT_COUNT}.intValue() % 2 ==0 )]]></conditionExpression> <style name="alternating" isDefault="false" mode="Opaque" forecolor="#000000" backcolor="#CCCCCC" fill="Solid" border="Thin" borderColor="#CCCCCC" isStyledText="true" /> </conditionalStyle> Works for me with v1.3.3..
×
×
  • Create New...