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

bsvorinic

Members
  • Posts

    15
  • 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 bsvorinic

  1. Using parameters? Another possible approach: we're mostly reporting from Oracle and there we use views or tables to store installation/evironment specific stuff. Haven't tried myself, but I guess that you could use SQL to generate hyperlink in report so that the same report (jrxml) displays different links depending on where it's deployed... HTH, Bruno
  2. Text Field => Properties => Text Field => Rotation?
  3. Place a Frame component in summary band so that it fills the whole band (Size to Container => Fit Both). Uncheck Appearance => Transparent property for the frame, place any other components you need into this frame... HTH, Bruno
  4. We use Oracle and the way we solve this is to add some "blanc"/"empty" records at the beginning of result dataset, something like: SELECT ROWNUM * - 1 AS ord, '' AS text1, '' AS text2 FROM dba_objects WHERE ROWNUM < 10 UNION SELECT ROWNUM AS ord, 'some text1' AS text1, 'some text2' AS text2 FROM dual ORDER BY 1; You can than use JasperReports parameter to define number of blank rows needed (replace " ROWNUM < 10" with " ROWNUM < $P{NUMBER_OF_BLANKS}" or whatever you want to call this parameter)... HTH, Bruno
  5. Use one "master" report with subreports for Report A and Report B. Browse documentation and HowTo's for "subreports". Best way to approach this is to create report for Report A, test it and make sure it works, do the same for Report B, and than create "master" report and include existing reports as subreports. HTH, Bruno
  6. Hi, I think this is a Windows problem - for some reason they don't allow you to choose font file that way. What I like to do is open Windows Explorer, browse to c:WindowsFonts and than copy the fonts to some other directory, for example Workspace or project. Then I browse to that directory from Eclipse (JasperStudio)... HTH, Bruno
  7. Seems strange to have hundreds of fonts inside one report - maybe you are talking about text fields or static text components inside report? If that is the case than you can have couple of conditional styles which change font name depending on report parameter for example: just set "Conditional expression" parameter of conditional style to "$P{FONT_NAME_PARAMETER} == "Arial"", and set Font property to Arial for example. That way you could have configuration in one place and use it through report parameters when calling report. HTH
  8. Something looks strange in your parameters: - if parameter lobTC is empty parameter sqlpart will be empty so your query will resolve to "select * from ba where" which is not a valid SQL command and you should be getting error. This can be solved by defining parameter sqlpart as "(($P{lobTC} == null) ? "1 = 1" : " and ba.ins_lob_tc in (" + $P{lobTC} + ") ")". This way you will get all records from table ba because SQL will be "select * from ba where 1 = 1". - depending on what type field ba.ins_lob_tc is parameter lobTC should be a comma separeted list of values, something like "1, 13, 234" if field is of integer type. HTH
  9. I think you should use subreports: on main report you can have: COLUMN HEADER (1) DETAIL (1) and DETAIL (2) band on this "main" form should have subreport component inside. Subreport is just another report which then has COLUMN HEADER (2) DETAIL (2) inside... HTH
  10. This is done using variables - see http://community.jaspersoft.com/wiki/using-report-variables or https://stackoverflow.com/questions/13550514/how-to-sum-all-values-in-a-column-in-jaspersoft-ireport-designer... Regards, Bruno
  11. You need to be more specific. If the question is how to get data for specific period and you are using SQL to retrieve data for report you should use parameters to define WHERE condition inside SQL. My approach is to prepare and test SQL outside Jasper Studio using SQL Developer or similar tool and then use tested SQL inside report. If the problem is formating and displaying timestamp, then you can use PATTERN property of the TEXT field to format data the way you want, or use Java inside EXPRESSION property to format output (for example "new SimpleDateFormat("dd.MM.yyyy").format($F{DATUM}"). Regards, Bruno
  12. Is there a way to use resource strings from resource bundle to replace strings inside SQL statement? For example: SELECT CASE WHEN company_size_id = 0 THEN 'Small' WHEN company_size_id = 1 THEN 'Medium' WHEN company_size_id = 2 THEN 'Large' ELSE 'Unknown' END AS company_size FROM companies If I have a resource bundle locale.properties like: small = 'Small' medium = 'Medium' large = 'Large' I was hoping I could use somethinkg like $P!{parameter_name} to achieve this and write SQL this way: SELECT CASE WHEN company_size_id = 0 THEN $R!{small} WHEN company_size_id = 1 THEN $R!{medium} WHEN company_size_id = 2 THEN $R!{large} ELSE 'Unknown' END AS company_size FROM companies I tried using $R{small} and $R!{small} syntax but it does not seem to work. Is there maybe some clever workaround or another way to achieve my goal? Thanks in advance, Bruno
  13. Anyone? Still struggling with this, stuck with version 4.5...
  14. Anyone? I'm stuck with version 4.5 because of this. Tried 5.0 but still getting the same error. Thanks, Bruno
  15. Hi, I have a working report wich displays a SVG image by using Batik renderer: imageExpression is set to ![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstanceFromLocation("repo:star")]] (don't know how to insert piece of XML source here, sorry) This works perfectly when report is deployed to JasperReports Server 4.5, but when I deploy it to 4.7 I get exception (whole stack attached): net.sf.jasperreports.engine.JRException: Byte data not found at : repo:star Image is uploaded as resource within report. I also tried uploading it separately into Images folder of the repository, but server does not recognize it as an image and refuses to upload it. What am I doing wrong? What changed between 4.5 and 4.7? I searched the web and documentation for better part of today with not luck... Thanks in advance, Bruno
×
×
  • Create New...