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

Timbo2013

Members
  • Posts

    22
  • 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

Posts posted by Timbo2013

  1. Of course you can create PDF files without any server...

    If it is a simple Java application (Java SE) you might use this:

    public class MyReport{   static HashMap<String, Object> hm = new HashMap<String, Object>();       public static void main(String[] args)    {        hm.put("myID" , 1); // Integer        hm.put("myName" , "Timbo"); // String        hm.put(...);               String in = "c:/PATH/TO/YOUR/REPORT.jrxml";        String out = "c:/PATH/TO/YOUR/PDF.pdf";        try        {            // compile report            JasperReport jasperReport = JasperCompileManager.compileReport(in);                       // fill report            JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, hm, new JREmptyDataSource());                       // export report to PDF            JasperExportManager.exportReportToPdfFile(jasperPrint, out);        }        catch (JRException e)        {            e.printStackTrace();        }    }}[/code]
  2. My subreport in the header ist only printed once with given input data...  On the second page only static elements (lines, static text, ...) are printed.   =/

    The Checkbox "Print Repeated Values" seems to do nothing...  I tried also a lot of other properties but without any success.

     

    Any idea or hint...?

  3. Hallo together!

    I have the same / a similar problem. In the page header I have placed a subreport. On the first page it is printed correctly but on the second page just the static textfields of the subreport are printed - no variables / dynamic textfields...

    I Tried a lot for example with "Print Repeated Values", "When No Data Type", "Print When Deteil Overflows" and some more...  But no luck.   =/

  4. I created an SVG file with batik. It can be opend with the browser - looks fine.

    But how do I get the "needed" byte array...? Do I have to generate a file first or when is the "turn-over-point" ?^^

  5. Try this:

    <image scaleImage="RetainShape" hAlign="Center" vAlign="Middle">
       <reportElement uuid="0eae3352-7e0c-40fe-a01a-1a3f72b030ac" x="0" y="37" width="195" height="38"/>
       <imageExpression><![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File("path/to/the.svg"))]]></imageExpression>
    </image>

    (tested with JasperReports v5.2.0 and iReport v5.1.0)

     

    Also see:

    http://community.jaspersoft.com/wiki/how-add-svg-image-your-report-jrxml

  6. Hello bjarkekr,

    try this:

    <image scaleImage="RetainShape" hAlign="Center" vAlign="Middle">
       <reportElement uuid="0eae3352-7e0c-40fe-a01a-1a3f72b030ac" x="0" y="37" width="195" height="38"/>
       <imageExpression><![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File("path/to/the.svg"))]]></imageExpression>
    </image>

    (tested with JasperReports v5.2.0 and iReport v5.1.0)

     

    Also see:

    http://community.jaspersoft.com/wiki/how-add-svg-image-your-report-jrxml

  7. Hello clhubert,

    yes, there is a way to inetrate SVG in reports.

    For example you can use:

    <image scaleImage="RetainShape" hAlign="Center" vAlign="Middle">
       <reportElement uuid="0eae3352-7e0c-40fe-a01a-1a3f72b030ac" x="0" y="37" width="195" height="38"/>
       <imageExpression><![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File("path/to/the.svg"))]]></imageExpression>
    </image>

    (tested with JasperReports v5.2.0 and iReport v5.1.0)

     

    Also see:

    http://community.jaspersoft.com/wiki/how-add-svg-image-your-report-jrxml

  8. I did it^^

    Filling a report with hashmap "and bean" - though the bean has been added to the hashmap:

    yes: [...].fillReport(report, hashMap, new JREmptyDataSource());

    no: [...].fillReport(report, hashMap, beanDataSource);

     

    I'll write down my experiences for me and if a tutorial is still wanted I could try to translate it (from German to English^^)...!?

  9. I had a similar problem as I was trying to print a "static list" with subreport elements...  All static was printed as often as entries in the subreport - but the subreport area stayed blank^^

    How do you fill your template?

    For example:

    1. jasperPrint = JasperFillManager.fillReport(report, params, new JREmptyDataSource());
    2. jasperPrint = JasperFillManager.fillReport(report, null, beanDataSource);
    3. jasperPrint = JasperFillManager.fillReport(report, params, beanDataSource);

    I think there are many other ways, but I was filling reports with these three last two weeks...  =)

  10. Same thing with the "general problem" here...

    I read about it many times and the way I fixed the "Test Connection" was to create only an empty constructor for the beanList offering class.

    But I've got still problems to get the data from my list correctly into my report --> subreport area is empty and the whole report is printed as often as the subreport has entries^^

     

    edit:

    I solved my problem - I added the bean to my hashmap and passed it to the subreport like a parameter...

  11. Same case with the "general problem" here...

    I read about it many times and the way I fixed the "Test Connection" was to create only an empty constructor for the beanList offering class.

    But I've got still problems to get the data from my list correctly into my report --> subreport area is empty and the whole report is printed as often as the subreport has entries...

     

    edit:

    I solved the problem in another way - I added the bean to my hashmap and passed it to the subreport as a parameter...

  12. Huhu,

    I might have a similar problem: my input data is an XML file and in addition to that I've got an XSL-FO file with all the formattings...
    Now I want to create a template in iReport --> can the XSL formattings be imported somehow or do I have to format all entries by hand...?!

  13. Hello from Germany!


    I'm studying geoinformatics and currently a trainee in a software programming and service company. My main target is to become friends with JaserReports and iReport. So far I finished several tutorials for each and I'm keen to continue working with it. At the moment I'm creating templates with iReport for different things. But today there was a question which I can't answer neither immediately nor after some investigations - so here I am^^


    I have to create a template with iReport Designer (later be printed as PDF) where the main or even the hole page is used by images. And in addition to that those images have to lie on top of each other. Each image carries just little information like rivers - next picture delivers woods - and so on...   As you might guess: each single image is like a layer in a GIS and should have no background or be transparent instead. Of course I can put several image-containers on the same place - but the question is if there is a way to handle this with an array, a list or something else?! Because if I place for example 10 images but need only 2 or even worse I need 12...?!


    Well, is it possible to place dynamic number of transparent images at same location by using a kind of array / list / vector / collection / ... ?


×
×
  • Create New...