vzdy to nutne neni, jak jiz bylo zmineno je mozne pouzit

JasperReport sestava = JasperCompileManager.compileReport(jasperTemplate);

kompilaci muzete zjednodusit pomoci antu a v aplikaci pouzivat pouze 
zkompilovane reporty.

    <target name="compile-all-jasperreports" depends="init">
            <path id="classpathjasper">
                <pathelement location="${my.report.dir}"/>
                <fileset dir="${lib.dir}">
                    <include name="**/*.jar"/>
                </fileset>
            </path>

            <taskdef name="jrc" 
classname="net.sf.jasperreports.ant.JRAntCompileTask">
                <classpath refid="classpathjasper"/>
            </taskdef>

            <jrc destdir="${my.report.dir}">
                <src>
                    <fileset dir="${my.report.dir}">
                        <include name="**/*.jrxml"/>
                    </fileset>
                </src>
                <classpath refid="classpathjasper"/>
            </jrc>
    </target>

Tomas

-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Petr Burdik
Sent: Mon 5/7/2007 11:19 AM
To: Java
Subject: Re: jednoduchy example pro jasperreports


Je potreba vzdy kompilovat ty sablony?

Bohuzel v tom err pres getMessage vic neni. Leda cely StackTrace.


On Mon, 07 May 2007 11:05:34 +0200, Leos Urban <[EMAIL PROTECTED]> wrote:

> Ahoj,
>
> nenahrava nahodou ten loadObject() _zkompilovany_ report a ty mu
> podstrkujes _zdrojovou_  sablonu v XML?
>
> Kazdopadne by ve vypisu celeho Exception bylo vice informaci.
>
> Leos
>
> Petr Burdik píse v Po 07. 05. 2007 v 10:35 +0200:
>> Vybral jsem si :)
>>
>> Nevite co delam spatne?
>>
>>          //
>>          Request request1 = new Request();
>>              request1.setRequestId(Long.valueOf(1));
>>              request1.setAoid(Long.valueOf(1));
>>              request1.setShopOid(Long.valueOf(150));
>>              request1.setPriceDifference(Double.valueOf(150.00));
>>              request1.setPriceOld(Double.valueOf(100.00));
>>              request1.setPriceNew(Double.valueOf(250.00));
>>          Request request2 = new Request();
>>              request2.setRequestId(Long.valueOf(2));
>>              request2.setAoid(Long.valueOf(2));
>>              request2.setShopOid(Long.valueOf(150));
>>              request2.setPriceDifference(Double.valueOf(100.00));
>>              request2.setPriceOld(Double.valueOf(100.00));
>>              request2.setPriceNew(Double.valueOf(200.00));
>>          List myList = new ArrayList();
>>              myList.add(request1);
>>              myList.add(request2);
>>
>>          Map params = new HashMap();
>>          try {
>>
>>              JRBeanCollectionDataSource dataSource = new
>> JRBeanCollectionDataSource(myList);
>>              JasperReport report = (JasperReport)
>> JRLoader.loadObject("/home/pet/jetest.jrxml");
>>              JasperPrint jasperPrint =
>> JasperFillManager.fillReport(report,
>> params, dataSource);
>>              
>> JasperExportManager.exportReportToPdfFile(jasperPrint,"/home/pet/jetest.pdf");
>>          } catch (JRException ex) {
>>              jtaOutput.setText(jtaOutput.getText() + ex.getMessage()
>> + "7
>> \n");
>>              ex.printStackTrace();
>>          }
>>
>>
>> Na radku JasperReport report = (JasperReport)
>> JRLoader.loadObject("/home/pet/jetest.jrxml"); vyhlasi, ze nemuze nacist
>> tento soubor.
>>
>> Report
>> Error loading object from file : /home/pet/jetest.jrxml7
>>
>>
>> Pet
>>
>> On Mon, 07 May 2007 09:02:22 +0200, Volsicky Tomas
>> <[EMAIL PROTECTED]> wrote:
>>
>> > Zkuste se podivat na interface JRDataSource ktery implementuji
>> > nasledujici tridy
>> >
>> > JRAbstractBeanDataSource, JRBeanArrayDataSource,
>> > JRBeanCollectionDataSource, JRCsvDataSource, JREmptyDataSource,
>> > JRHibernateAbstractDataSource, JRHibernateIterateDataSource,
>> > JRHibernateListDataSource, JRHibernateScrollDataSource,
>> JRJpaDataSource,
>> > JRMapArrayDataSource, JRMapCollectionDataSource, JRMondrianDataSource,
>> > JRResultSetDataSource, JRTableModelDataSource, JRXmlDataSource
>> >
>> > myslim ze si vyberete :-)
>> >
>> >  JasperReport report = (JasperReport)
>> > JRLoader.loadObject(app.getRealPath(sReportName));
>> >  JasperPrint jasperPrint = JasperFillManager.fillReport(report,
>> params,
>> > dataSource);
>> >
>> >
>> >
>> > s pozdravem
>> > Tomas
>> >
>> >
>> > -----Original Message-----
>> > From: [EMAIL PROTECTED] on behalf of Petr Burdik
>> > Sent: Mon 5/7/2007 8:55 AM
>> > To: Java
>> > Subject: jednoduchy example pro jasperreports
>> >
>> > Ahojte,
>> > jeste se prodiram dokumentaci. Mam vytvorenou sablonku, mam javabean. 
>> Ted
>> > resim jak to propojit. Potrebuji poslat kolekci java beanu do
>> generatoru
>> > sestavy. Nic vic. Ale vsude v examples co mam to resi pres nejaky sql
>> > datasource. Nejak se mi nedari to najit. Mozna spatne googluji.
>> Nenastli
>> > jste prosim nejakou solidni dokumentaci nekde na netu pri svem
>> > experimentovani?
>> >
>> > Preji pekny den
>> > Pet
>> >
>> > --
>> > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>> >
>> > ==SMS8260 CZ
>> > Tento email prichazi z Internetu - ujistete se, ze je autenticky.
>> Tesco
>> > muze sledovat adresy a technicke podminky emailove komunikace.
>> >
>> > This email is from the Internet - check that it is genuine. Tesco may
>> > monitor addresses and technical conditions of email communications.
>> >
>> >
>> > ==SMS8260 CZ
>> >
>> >  -- Prohlaseni --
>> > Toto je duverny email. Tesco muze sledovat adresy a technicke podminky
>> > emailove komunikace. Nazory uvedene v tomto emailu odrazeji zamer
>> > odesilatele, nemusi vsak odrazet nazory spolecnosti Tesco Stores CR
>> > a.s., se sidlem Vrsovicka 1527/68b, 100 00 Praha 10, IC: 45308314.
>> >
>> >  -- Disclaimer --
>> > This is a confidential email. Tesco may monitor addresses and
>> technical
>> > conditions of email communications. The views expressed in this email
>> > are those of the sender and not necessarily those of Tesco Stores CR
>> > a.s., located at Vrsovicka 1527/68b, 100 00 Praha 10, IC: 45308314.
>>
>>
>>
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

==SMS8260 CZ
Tento email prichazi z Internetu - ujistete se, ze je autenticky. Tesco muze 
sledovat adresy a technicke podminky emailove komunikace.

This email is from the Internet - check that it is genuine. Tesco may monitor 
addresses and technical conditions of email communications.


==SMS8260 CZ

 -- Prohlaseni --
Toto je duverny email. Tesco muze sledovat adresy a technicke podminky emailove 
komunikace. Nazory uvedene v tomto emailu odrazeji zamer odesilatele, nemusi 
vsak odrazet nazory spolecnosti Tesco Stores CR a.s., se sidlem Vrsovicka 
1527/68b, 100 00 Praha 10, IC: 45308314.

 -- Disclaimer --
This is a confidential email. Tesco may monitor addresses and technical 
conditions of email communications. The views expressed in this email are those 
of the sender and not necessarily those of Tesco Stores CR a.s., located at 
Vrsovicka 1527/68b, 100 00 Praha 10, IC: 45308314.

<<winmail.dat>>

Odpovedet emailem