Resetting PageNumber in a single report

2005-07-04 Thread BhaskarKS
Title: Resetting PageNumber in a single report






Hi All,


I am using FOP to generate PDF file which contains multiple reports.

I need to Reset the page number(i.e. start from 1 again) after the completion of each report.

Can someone please suggest how to achieve this?


Thanks and Regards

Bhaskar K S



DISCLAIMER:This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. 


Re: Resetting PageNumber in a single report

2005-07-04 Thread Chris Bowditch

[EMAIL PROTECTED] wrote:

I need to Reset the page number(i.e. start from 1 again) after the 
completion of each report.


Can someone please suggest how to achieve this?“


create a new page-sequence for each report and specify initial-page-number=1 
on the page-sequence element.


Chris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



baseDir Problem with images

2005-07-04 Thread Peter Kalsch

Hi all,
I want to generate a pdf with Fop with the help of velocity-servlets .
The application works fine and the the generating of pdf makes no 
problems, without images in the vm-file. Now, I want to add an image. No 
problem? A big problem for me, obviously! The application works fine 
again, BUT the generated pdf-file displays no image.

What's going wrong?

1. entry in servlet init()-Method
...
new Options(new 
File(/usr/local/tomcat/webapps/webAT/conf/userconfig.xml));

...

2. Entry in userconfig.xml:
 entry
   keybaseDir/key
   valueusr/local/tomcat/webapss/webAT/templates/pdf//value
 /entry

I tried a lot, like this
 value./webAT/templates/pdf//value
or like this
value/templates/pdf//value
or like this
valuewebAT/value
an so on


3. abs. Path to the vm-File on my testserver is
usr/local/tomcat/webapps/webAT/templates/pdf/test.vm

4. abs. Path to image
usr/local/tomcat/webapps/webAT/templates/pdf/logotr.gif  --  the same 
directory



5. vm-File:
snip
fo:external-graphic height=16pt  scaling=uniform 
src=url('file:logotr.gif')/

snip

6. I'm looking in the mailing for similar problems. But all proposals to 
solve the problem failed.

And whatever I try, I got more than less the same error:

Error while creating area : Invalid Image URL - error on relative URL : 
no protocol:


usr/local/tomcat/webapss/webAT/templates/pdf/logotr.gif


Additionally, I tried an alternative:
servlet init()-Method :
snip
Configuration.put(baseDir, file: +  
getServletContext().getRealPath(/WebAT/templates/pdf/) );

snip
errormessage:
Error while recovering Image Informations 
(file:/usr/local/tomcat/webapps/webAT/WebAT/templates/pdf/logotr.gif) : 
/usr/local/tomcat/webapps/webAT/WebAT/templates/pdf/logotr.gif (No such 
file or directory)



further informations:
Eclipse 3.0.2
Apache Tomcat/5.0.28
FOP 0.20.5

Any idea? Have I overlooked a simple fault?
Thanks in advance
Peter

--

  FACHHOCHSCHULE KAISERSLAUTERN STANDORT ZWEIBRUECKEN
  Competence Center Instructional Design in Technology(CCIDT)
 
  Geschäftsleitung

  Dipl.-Inf.(FH) Peter Kalsch   Amerikastrasse 1
D-66482 Zweibruecken
  Tel. : +49-(0)6332/914-396  
  eMail: [EMAIL PROTECTED] 
  www.ccidt.de




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: baseDir Problem with images

2005-07-04 Thread The Web Maestro

On Jul 4, 2005, at 7:57 AM, Peter Kalsch wrote:
snip
6. I'm looking in the mailing for similar problems. But all proposals 
to solve the problem failed.

And whatever I try, I got more than less the same error:

Error while creating area : Invalid Image URL - error on relative URL 
: no protocol:


usr/local/tomcat/webapss/webAT/templates/pdf/logotr.gif


Additionally, I tried an alternative:
servlet init()-Method :
snip
Configuration.put(baseDir, file: +  
getServletContext().getRealPath(/WebAT/templates/pdf/) );

snip
errormessage:
Error while recovering Image Informations 
(file:/usr/local/tomcat/webapps/webAT/WebAT/templates/pdf/logotr.gif) 
: /usr/local/tomcat/webapps/webAT/WebAT/templates/pdf/logotr.gif (No 
such file or directory)



further informations:
Eclipse 3.0.2
Apache Tomcat/5.0.28
FOP 0.20.5

Any idea? Have I overlooked a simple fault?
Thanks in advance
Peter


In my experience, the 'default' basedir is where the Source XML file is 
stored. If you could place the graphics in a sub-directory of that 
folder, it should work (unless you're streaming the XML...). One other 
alternative I didn't see in your e-mail is using a URL instead of a 
PATH.


Hope this helps!

Regards,

Web Maestro Clay
--
[EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: baseDir Problem with images

2005-07-04 Thread Andreas L. Delmelle
 -Original Message-
 From: Peter Kalsch [mailto:[EMAIL PROTECTED]


Hi,

snip /
 1. entry in servlet init()-Method
 ...
 new Options(new
 File(/usr/local/tomcat/webapps/webAT/conf/userconfig.xml));
 ...


This obviously works...

 2. Entry in userconfig.xml:
   entry
 keybaseDir/key
 valueusr/local/tomcat/webapss/webAT/templates/pdf//value
   /entry

... but why do you use a relative path here? Try prepending a '/' to make it
absolute, see if that helps (?)

BTW: Did you notice the slight spelling-error? webapss instead of
webapps? (could also be the cause of your headaches...)


 3. abs. Path to the vm-File on my testserver is
 usr/local/tomcat/webapps/webAT/templates/pdf/test.vm

Again: this is NOT an absolute path, but a relative one... (the root is
missing)


 4. abs. Path to image
 usr/local/tomcat/webapps/webAT/templates/pdf/logotr.gif  --  the same
 directory

Idem dito.



 5. vm-File:
 snip
 fo:external-graphic height=16pt  scaling=uniform
 src=url('file:logotr.gif')/
 snip

IIC, this URL isn't valid. Should at least start with 'file://' (at least, I
remember vaguely from reading the related RFC, will have to look it up
myself to be sure...)


 6. I'm looking in the mailing for similar problems. But all proposals to
 solve the problem failed.
 And whatever I try, I got more than less the same error:

 Error while creating area : Invalid Image URL - error on relative URL :
 no protocol:

Et voilà, it is indeed a *relative* URL, not an absolute one.


 usr/local/tomcat/webapss/webAT/templates/pdf/logotr.gif


 Additionally, I tried an alternative:
 servlet init()-Method :
 snip
 Configuration.put(baseDir, file: +
 getServletContext().getRealPath(/WebAT/templates/pdf/) );

To pull this off, I think you need just '.getRealPath(/templates/pdf/)'

 snip
 errormessage:
 Error while recovering Image Informations
 (file:/usr/local/tomcat/webapps/webAT/WebAT/templates/pdf/logotr.gif) :
 
See?


HTH!

Greetz,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]