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

federico.cattozzi

Members
  • Posts

    87
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by federico.cattozzi

  1.  Do you know js-import and js-export utilities?

    From Command Line you can export everything from JS Repository to file system:

     js-export --uris=path_on_JS_repository --output-dir=dir_on_filesystem

     js-export --uris=path_on_JS_repository --output-zip=zip_on_filesystem

    Read JasperServer User Guide, pages 51-52.

    Schedule a OS task using js-export utility.

     



    Post Edited by helyair at 02/10/2011 08:05
  2.  I had the same problem to version reports and i solved it with a script.

    I had to version my reports on IBM Rational ClearCase, but every export/import was different due to some values into jrxml and into other xml files, so also if two files were the same, everytime CC creates a new version of them.

    If you use iReport, it writes some useless properties into jrxml, read this to remove them.

    My script does it:

    1. export all reports from JasperServer into a dir (not a zip file)
    2. overwrite all <version> and <creationDate> tags into all *.xml files in all sub-directories with default values, I chose respectively "0" and "2010-01-01T00:00.000+00:00" (I used a sed command with Cygwin on Windows XP)
    3. now exported files and versioned files are different only for file timestamps (creation/modification date) and for real changes. To copy only files really changed into versioning directory I use a rsync command that compare files only using their checksum.

    If you want only to do a easy compare try diff softwares like WinMerge (freeware for Windows).

    With WinMerge:

    1. export all reports from development environment into a directory
    2. export all reports from production environment into another directory
    3. open WinMerge
    4. click on File -> Open...
    5. select Left (development ) and Right (production ) directories and click OK. You will see all differences between every pair of files
    6. Go to Tools -> Filters... and Linefilters tab
    7. create two line filters (New, write and Save and finally click OK):
      • <version>(.*)</version>
      • <creationDate>(.*)</creationDate>
    8. Go to Edit -> Options -> Compare -> "File Compare method:" and select "Full Contents" instead of "Quick Contents"
    9. Refresh view with F5
       

     

  3.  Is it a practicable to create a new option that permits to view XML code of an object from Designer view?

    I imagine this:

    1. user selects an object in Designer view
    2. user clicks the right mouse button on the object 
    3. A new option  "View as XML" is present
    4. user clicks on this button and iReport opens XML view with the object's code selected

    Thank you

  4. I didn't think that Groovy was so powerful! 

    I use Joda, a Java framework for dates.

     If i have to filter rows by a date I use a parameters as DATE_FROM.

    The default value for DATE_FROM can be:

    new org.joda.time.DateMidnight().minusDays(365).toDate()

    or

    new org.joda.time.DateMidnight().minusYears(1).toDate()

    Joda is very useful to work with dates on a single line of code.

    You can add Joda's jar to iReport or Tomcat/JasperServer classpath. 

  5. Thank you!

    giulio
    Wrote:

    ...

    About report unit and url, these are stored when you download a report from Jasperserver. They are used to update the input controls when you update the parameters.

    Giulio

     

    I'm sorry, but I can not think which piece of the input control can be altered depending on the parameter.

    Can you explain it to me more clearly? I have noticed these properties only recently.

    Grazie Giulio, sei sempre disponibile ;)

  6. Hi,
    I have to version reports' files but iReport saves useless and variable data into jrxml.
    For example: ireport.x,  ireport.y and ireport.zoom are properties that regulate report visualization into iReport.
    I don't want saves new version of the report every time that one of these properties changes.
    Unfortunately iReport recreates these properties if I delete them.
     
    Is there a way to prevent this behavior?
     
    Sometimes iReport adds also ireport.jasperserver.reportUnit and ireport.jasperserver.url properties.
    What is their use?

    Code:
    <?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="...">	  <property name="ireport.zoom" value="1.0"/>  <property name="ireport.x" value="45"/>  <property name="ireport.y" value="0"/>  <property name="ireport.jasperserver.reportUnit" value="..."/>  <property name="ireport.jasperserver.url" value="..."/>...</jasperReport>
  7. swood
    Wrote:

    What you are after is what we call "cascading input controls". There is no solution for this right now, but we are looking to package up some extensions to JasperServer you can add to do this.

     

    Sherman

    Jaspersoft

     

     

    Is there any news?...

    I have tried to use $P{LoggedInUsername} on a input control query.

    Query runs correctly, but every browser (Safari, Firefox, IE) gives same error. See image below.

    Update: this error occurs only on JS 3.7, it doesn't occur on JS 3.5.

    Post Edited by helyair at 08/30/2010 13:16



    Post Edited by helyair at 08/30/2010 13:38



    Post Edited by helyair at 08/30/2010 16:01
  8. If you have many reports and many input controls to translate, following query can be used on JS MySQL db to print all input control definitions:

    Code:
    mysql> SELECT DISTINCT    ->   concat('net.sf.jasperreports.prompt.label.', c1.name,'=',c1.label) as input_name    -> FROM    ->   jasperserver.jireportunitinputcontrol a    ->   INNER JOIN jasperserver.jireportunit b    ->  ON a.report_unit_id = b.id    ->   INNER JOIN jasperserver.jiresource c    ->  ON c.id = b.mainReport    ->   INNER JOIN jiresourcefolder rf    ->  ON c.parent_folder = rf.id    ->   INNER JOIN jasperserver.jiresource c1    ->  ON c1.id = A.input_control_id    -> ORDER BY    ->   input_name asc;+-------------------------------------------------------------------------------------------------+| input_name                                                                                      |+-------------------------------------------------------------------------------------------------+                                    || net.sf.jasperreports.prompt.label.ASC_DESC=Ascending/Descending                                 |                                    |                          || net.sf.jasperreports.prompt.label.CONNECTION_TYPE=Connection Type                               || net.sf.jasperreports.prompt.label.CREATION_DATE_FROM=Creation Date from                         || net.sf.jasperreports.prompt.label.CREATION_DATE_TO=Creation Date to                             |                                    || net.sf.jasperreports.prompt.label.DISPLAY_TYPE=Display Type                                     |                                          || net.sf.jasperreports.prompt.label.ERROR_CATEGORY=Error Category                                 |... 
  9. I use a combo box Input Control to permit to choice a sort option on my JasperServer and I use code like this in the report query:

    SELECT name, surname
    FROM
        user
    ORDER BY
        $P!{ORDER_BY} $P!{ASC_DESC}

    So, Oracle Database has internal optimizations if you enter the same query several times.

    If  I want to change after the first run only the order of the rows, query is submitted equal to before aside for ORDER BY clause.

    There is a <sortField>  tag which permits to change the order after query submit, but this tag can contain only static field name.

    Is is possible to have a <sortParameter> or something else in the next releases of JasperReports?


  10.  

    I have scheduled a report on JS to run every 1 minute, output format is HTML and I have permitted overwriting.

    Url of the report output file doesn't change, so I could insert this meta in HTML Header:

    <meta http-equiv="refresh" content="5">

    Angusmiller's solution doesn't works for scheduled reports.

    Schedule uses default HTML Header hardcoded in net.sf.jasperreports.engine.export.JRHtmlExporter class.


     



    Post Edited by helyair at 12/23/2009 14:19
  11. I have scheduled a report on JS to run every 1 minute, output format is HTML and I have permitted overwriting.

    Url of the report output file doesn't change, so I could insert this meta in HTML:

    <meta http-equiv="refresh" content="5">

    There is a way to do this?

    Thank you.



    Post Edited by helyair at 12/22/2009 14:35
  12. I'm interested about:

    * Multiple Scriplets per Report and Report Governors
    - JasperReports now allows multiple scriplet instances per
    report template. Some such scriptlets can be declared
    globally to act as report governors, preventing invalid
    report layouts from causing infinite loops when the report
    is filled. JasperServer also provides default governor
    implementations that limit report execution based on a
    maximum number of pages and/or timeout.

    Where are "maximum number of pages and/or timeout" properties?
     

  13. I reply to myself.

    The problem is caused by the code here below:

    Code:
    	<parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User" isForPrompting="false"/>	<parameter name="USERNAME" class="java.lang.String" isForPrompting="false">		<defaultValueExpression><![CDATA[$P{LoggedInUser}.getUsername()]]></defaultValueExpression>	</parameter>
×
×
  • Create New...