From: Fred Welland <f.welland@ve...> - 2004-03-01 16:12:54
I am not sure that this would work with Jasper, but for our Ant build files we have a file with a bunch of common tasks, targets, and properties that is included in each project's build file.
So in our ANT file we do something like this:
<!DOCTYPE project [
<!ENTITY common SYSTEM "file:./CommonBuild.xml">
<project name="myProject" default="compile" basedir="." >
This just inlcude the conntents of './CommonBuild.xml' in each build file.
Not sure if you could do this for Jasper or if this even suits your needs, but may be something to look at.
> From: ian@...
> Date: 2004/03/01 Mon AM 10:43:17 EST
> To: jasperreports-questions@...
> Subject: [jasperreports-questions] Report templates, factoring out common elements
> Has anyone here thought of this? Here's our problem: we're about to create n reports (maybe 5, maybe more?) with common elements such as pageheader/pagefooter, etc. Has anyone devised a clever way to do this? I was thinking if it is not already possible, could we add a <template> tag to the jasper report xml descriptor, so that we could write common report design in one master file and include that in sub-reports, but writing only the unique report elements there in, e.g.:
> master report file:
> actual reports:
> <template file="master.jasper.xml" />
> <variable />
> <field />
> <field />
> <group /> <group />
> my idea was to do something like this, and inherit every tag from the master template file and use that to create the JasperDesign, thus not duplicating a bunch of design stuff that could be factored out...
> can anyone suggest how i might do this? can anyone argue that copy and paste is cleaner? :) i think it would be fairly easy to write some stuff given the current API.. what does anyone think?
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> jasperreports-questions mailing list