You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Yves Vindevogel <yv...@implements.be> on 2005/09/06 18:31:03 UTC

JasperReports / JFreeReports

Hi,

Is there any interaction that exists (serializers, transformers, ...) 
between Cocoon and JasperReports and JFreeReports ?

Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements


Re: RE: Antwort: Re: JasperReports / JFreeReports

Posted by ho...@armacell.com.
Thanks,

it seems that the fragment is written into a (temporary) file. The 
filename is created using some hashing:

 String id = Long.toHexString((hashCode()^HashUtil.hash(requestURI)) + 
fragmentID);

After that, tha Extractor seems to output something like:

<fe:fragment fragment-id="<id>"/> where ID is the file name.

If I figured out how this actually works I hope to find time to contribute 
a small wiki for this.

Probably there's something in the samples. Thanks anyway.

Regards
Holger

users-return-82109-holger.willenborg=armacell.com@cocoon.apache.org 
schrieb am 08.09.2005 11:35:51:

> >From: holger.willenborg@armacell.com
> >Date: Wed, 7 Sep 2005 14:53:34 +0200
> >
> > >
> > > A quick thought - would it be possible to use the Fragment Extractor
> > > Transformer to write out the (generated) XML for JasperReports into 
a
> >file,
> > > then point JR at that?
> > >
> > > Andrew.
> > >
> >Can you give an example how this Transformer would create a file? The 
User
> >Docs and the wiki do not contain any valuable information.
> 
> Don't know really, as I've not used it myself (which is why it was just 
a 
> quick thought).  As I understand it, though, that transformer extracts 
part 
> of the XML stream into a separate file and replaces it with some ID that 
you 
> can use in conjunction with another pipeline to process that file.  Of 
> course, I may be mistaken...
> Although it was obviously written to remove an SVG section and 
substitute an 
> IMG whose source is a pipeline that converts it to a bitmap, it seems to 
me 
> that it ought to be possible to e.g. have it extract your XML definition 
for 
> JasperReports, and replace it with an IFRAME that loads the output from 
your 
> reader (or, if not, it may be possible to adapt it to do so).  You're 
right 
> that the docs are poor, 
> 
http://cocoon.apache.org/2.1/userdocs/transformers/extractor-transformer.html
> doesn't even mention if there's any configuration or parameters that can 
be 
> used with it.  I guess you'll have to dig through the source instead :-(
> 
> 
> Andrew.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

RE: Antwort: Re: JasperReports / JFreeReports

Posted by Andrew Stevens <at...@hotmail.com>.
>From: holger.willenborg@armacell.com
>Date: Wed, 7 Sep 2005 14:53:34 +0200
>
> >
> > A quick thought - would it be possible to use the Fragment Extractor
> > Transformer to write out the (generated) XML for JasperReports into a
>file,
> > then point JR at that?
> >
> > Andrew.
> >
>Can you give an example how this Transformer would create a file? The User
>Docs and the wiki do not contain any valuable information.

Don't know really, as I've not used it myself (which is why it was just a 
quick thought).  As I understand it, though, that transformer extracts part 
of the XML stream into a separate file and replaces it with some ID that you 
can use in conjunction with another pipeline to process that file.  Of 
course, I may be mistaken...
Although it was obviously written to remove an SVG section and substitute an 
IMG whose source is a pipeline that converts it to a bitmap, it seems to me 
that it ought to be possible to e.g. have it extract your XML definition for 
JasperReports, and replace it with an IFRAME that loads the output from your 
reader (or, if not, it may be possible to adapt it to do so).  You're right 
that the docs are poor, 
http://cocoon.apache.org/2.1/userdocs/transformers/extractor-transformer.html 
doesn't even mention if there's any configuration or parameters that can be 
used with it.  I guess you'll have to dig through the source instead :-(


Andrew.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Antwort: Re: JasperReports / JFreeReports

Posted by ho...@armacell.com.
> 
> A quick thought - would it be possible to use the Fragment Extractor 
> Transformer to write out the (generated) XML for JasperReports into a 
file, 
> then point JR at that?
> 
> Andrew.
> 
Can you give an example how this Transformer would create a file? The User 
Docs and the wiki do not contain any valuable information. 

Thanks for any pointer.

Regards
Holger

Re: JasperReports / JFreeReports

Posted by Andrew Stevens <at...@hotmail.com>.
>From: holger.willenborg@armacell.com
>Date: Wed, 7 Sep 2005 09:21:53 +0200
>
>Hi Yves,
>
>I wrote a reader (which is far from being mature). It's not really
>integrated into Cocoon.  Let me know if you're interested.
>
>Here's how it works:
...
>I'd love to write a transformer for this, but since the XML processor is
>part of JasperReport (using Apache Commons Digester) and also a part of
>Cocoon, I couldn't find any "interface" where I could plug in cocoon the
>deliver the XML.

A quick thought - would it be possible to use the Fragment Extractor 
Transformer to write out the (generated) XML for JasperReports into a file, 
then point JR at that?

Just my 2 cents' worth, though I'm willing to accept ideas for getting my 
transformer unit test working in lieu of payment ;-)


Andrew.

>
>Does anyone know about other tools which also use a GUI to create reports
>and work with cocoon?
>
>Regards
>Holger
>
>users-return-82075-holger.willenborg=armacell.com@cocoon.apache.org
>schrieb am 06.09.2005 18:31:03:
>
> > Hi,
> >
> > Is there any interaction that exists (serializers, transformers, ...)
> > between Cocoon and JasperReports and JFreeReports ?
> >
> > Met vriendelijke groeten,
> > Bien ŕ vous,
> > Kind regards,
> >
> > Yves Vindevogel



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Antwort: Re: JasperReports / JFreeReports

Posted by Yves Vindevogel <yv...@implements.be>.
It was for PDF and XLS that I would love to try it.  I know both can be 
done from within Cocoon, but it seems more work with FOP than with 
Jasper.

On 07 Sep 2005, at 09:25, holger.willenborg@armacell.com wrote:

>
> I forgot to mention that at the moment it only delivers PDF files. I 
> have not yet tested HTML output.
>
> Regards
> Holger
>
> users-return-82086-holger.willenborg=armacell.com@cocoon.apache.org 
> schrieb am 07.09.2005 09:21:53:
>
>  >
>  > Hi Yves,
>  >
>  > I wrote a reader (which is far from being mature). It's not really
>  > integrated into Cocoon.  Let me know if you're interested.
>  >
>  > Here's how it works:
>  >
>  > An entry in the sitemap could look like this:
>  >
>  > <map:match pattern="myreport">
>  >                 <map:read src="report/classic.jrxml" 
> type="jasperreport">
>  >                         <map:parameter name="JDBCDatasource" value=
>  > "jdbc:postgresql://192.168.1.3:5432/test"/>
>  >                         <map:parameter name="JDBCUser"       
> value="<user>"/>
>  >                         <map:parameter name="JDBCPass"       
> value="<pass>"/>
>  >                         <map:parameter name="JDBCDriver"     value=
>  > "org.postgresql.Driver"/>
>  >                                
>  >                         <map:parameter name="custom" 
> value="mycustomparameter"
>  > />
>  >
>  >                 </map:read>                
>  > </map:match>
>  >
>  > As you can see there's no connection between the XML created by
>  > Cocoon, so the XML file with the report design must be present in
>  > the file system. URLs will not work in the src attribute (because
>  > JasperReports won't accept URLs). But it's OK to use with legacy
>  > reports. Nevertheless, you can pass parameters from the sitemap to
>  > the report . If this is what you're looking for, I would share the
>  > code somewhere.
>  >
>  > I'd love to write a transformer for this, but since the XML
>  > processor is part of JasperReport (using Apache Commons Digester)
>  > and also a part of Cocoon, I couldn't find any "interface" where I
>  > could plug in cocoon the deliver the XML.
>  >
>  > Does anyone know about other tools which also use a GUI to create
>  > reports and work with cocoon?
>  >
>  > Regards
>  > Holger
>  >
>  > users-return-82075-holger.willenborg=armacell.com@cocoon.apache.org
>  > schrieb am 06.09.2005 18:31:03:
>  >
>  > > Hi,
>  > >
>  > > Is there any interaction that exists (serializers, transformers, 
> ...)
>  > > between Cocoon and JasperReports and JFreeReports ?
>  > >
>  > > Met vriendelijke groeten,
>  > > Bien à vous,
>  > > Kind regards,
>  > >
>  > > Yves Vindevogel
>  > > Implements
>  > >
>  > > Mail: yves.vindevogel__implements.be  - Mobile: +32 (478) 80 82 91
>  > >
>  > > Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
>  > >
>  > > Web: http://www.implements.be
>  > >
>  > > First they ignore you.  Then they laugh at you.  Then they fight 
> you.  
>  > > Then you win.
>  > > Mahatma Ghandi.
>  > > 
> ---------------------------------------------------------------------
>  > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>  > > For additional commands, e-mail: users-help@cocoon.apache.org
Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements


Antwort: Re: JasperReports / JFreeReports

Posted by ho...@armacell.com.
I forgot to mention that at the moment it only delivers PDF files. I have 
not yet tested HTML output.

Regards
Holger

users-return-82086-holger.willenborg=armacell.com@cocoon.apache.org 
schrieb am 07.09.2005 09:21:53:

> 
> Hi Yves, 
> 
> I wrote a reader (which is far from being mature). It's not really 
> integrated into Cocoon.  Let me know if you're interested. 
> 
> Here's how it works: 
> 
> An entry in the sitemap could look like this: 
> 
> <map:match pattern="myreport"> 
>                 <map:read src="report/classic.jrxml" 
type="jasperreport"> 
>                         <map:parameter name="JDBCDatasource" value=
> "jdbc:postgresql://192.168.1.3:5432/test"/> 
>                         <map:parameter name="JDBCUser" value="<user>"/>
>                         <map:parameter name="JDBCPass" value="<pass>"/>
>                         <map:parameter name="JDBCDriver"     value=
> "org.postgresql.Driver"/> 
> 
>                         <map:parameter name="custom" 
value="mycustomparameter"
> /> 
> 
>                 </map:read> 
> </map:match> 
> 
> As you can see there's no connection between the XML created by 
> Cocoon, so the XML file with the report design must be present in 
> the file system. URLs will not work in the src attribute (because 
> JasperReports won't accept URLs). But it's OK to use with legacy 
> reports. Nevertheless, you can pass parameters from the sitemap to 
> the report . If this is what you're looking for, I would share the 
> code somewhere. 
> 
> I'd love to write a transformer for this, but since the XML 
> processor is part of JasperReport (using Apache Commons Digester) 
> and also a part of Cocoon, I couldn't find any "interface" where I 
> could plug in cocoon the deliver the XML. 
> 
> Does anyone know about other tools which also use a GUI to create 
> reports and work with cocoon? 
> 
> Regards 
> Holger 
> 
> users-return-82075-holger.willenborg=armacell.com@cocoon.apache.org 
> schrieb am 06.09.2005 18:31:03:
> 
> > Hi,
> > 
> > Is there any interaction that exists (serializers, transformers, ...) 
> > between Cocoon and JasperReports and JFreeReports ?
> > 
> > Met vriendelijke groeten,
> > Bien à vous,
> > Kind regards,
> > 
> > Yves Vindevogel
> > Implements
> > 
> > Mail: yves.vindevogel__implements.be  - Mobile: +32 (478) 80 82 91
> > 
> > Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
> > 
> > Web: http://www.implements.be
> > 
> > First they ignore you.  Then they laugh at you.  Then they fight you. 
> > Then you win.
> > Mahatma Ghandi.
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org

Re: JasperReports / JFreeReports

Posted by ho...@armacell.com.
Hi Yves,

I wrote a reader (which is far from being mature). It's not really 
integrated into Cocoon.  Let me know if you're interested.

Here's how it works:

An entry in the sitemap could look like this:

<map:match pattern="myreport">
                <map:read src="report/classic.jrxml" type="jasperreport">
                        <map:parameter name="JDBCDatasource" value=
"jdbc:postgresql://192.168.1.3:5432/test"/>
                        <map:parameter name="JDBCUser"       value=
"<user>"/>
                        <map:parameter name="JDBCPass"       value=
"<pass>"/>
                        <map:parameter name="JDBCDriver"     value=
"org.postgresql.Driver"/>
 
                        <map:parameter name="custom" value=
"mycustomparameter"/>

                </map:read> 
</map:match>

As you can see there's no connection between the XML created by Cocoon, so 
the XML file with the report design must be present in the file system. 
URLs will not work in the src attribute (because JasperReports won't 
accept URLs). But it's OK to use with legacy reports. Nevertheless, you 
can pass parameters from the sitemap to the report . If this is what 
you're looking for, I would share the code somewhere.

I'd love to write a transformer for this, but since the XML processor is 
part of JasperReport (using Apache Commons Digester) and also a part of 
Cocoon, I couldn't find any "interface" where I could plug in cocoon the 
deliver the XML. 

Does anyone know about other tools which also use a GUI to create reports 
and work with cocoon?

Regards
Holger

users-return-82075-holger.willenborg=armacell.com@cocoon.apache.org 
schrieb am 06.09.2005 18:31:03:

> Hi,
> 
> Is there any interaction that exists (serializers, transformers, ...) 
> between Cocoon and JasperReports and JFreeReports ?
> 
> Met vriendelijke groeten,
> Bien à vous,
> Kind regards,
> 
> Yves Vindevogel
> Implements
> 
> Mail: yves.vindevogel__implements.be  - Mobile: +32 (478) 80 82 91
> 
> Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
> 
> Web: http://www.implements.be
> 
> First they ignore you.  Then they laugh at you.  Then they fight you. 
> Then you win.
> Mahatma Ghandi.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org