BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Print preview with non standard paper size

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (RaveReports)
View previous topic :: View next topic  
Author Message
Lorne
Guest





PostPosted: Sun Mar 06, 2005 10:52 am    Post subject: Print preview with non standard paper size Reply with quote



I am using Rave 5.1.3 to print using code rather than the visual designer.

I want to print to a custom form that is not a standard size. How do I get
the rave preview to show the text on my custom page size which is 147mm wide
by 100mm tall?

I also need to print it on printers that centre the paper in the paper
feeder - at the moment the text prints on the left assuming A4 paper is
loaded so it only works if the custom paper is loaded on the left side of
the paper feeder.

Note that most printing is done on A4 so I just want the ability to change
the paper size for one code based report and put it back to default A4
afterwards.

There appears to be a rave function SetPaperSize(Size: integer; Width:
double; Height: double):boolean; but I can't get it to work so I am looking
for another way to do it or instruction on how to get SetPaperSize to work.

I tried posting this to the Nevrona.public.rave forum but got no response.


Back to top
Trevor Keegan
Guest





PostPosted: Mon Mar 07, 2005 1:48 am    Post subject: Re: Print preview with non standard paper size Reply with quote



Hello Lorne,

Quote:
I want to print to a custom form that is not a standard size. How do I
get
the rave preview to show the text on my custom page size which is 147mm
wide
by 100mm tall?
You should set your paper size to custom, then set the size of the custom

sheet in the printer settings.

Quote:
I also need to print it on printers that centre the paper in the paper
feeder - at the moment the text prints on the left assuming A4 paper is
loaded so it only works if the custom paper is loaded on the left side of
the paper feeder.
You should set the anchors of the dataregion so that it will centre on the

page

Quote:
There appears to be a rave function SetPaperSize(Size: integer; Width:
double; Height: double):boolean; but I can't get it to work so I am
looking
for another way to do it or instruction on how to get SetPaperSize to
work.

What version of Rave are you using.....IIRC there was a problem with this
that was fixed in version 5.x.x

Regards
Trevor Keegan



Back to top
Lorne
Guest





PostPosted: Mon Mar 07, 2005 12:53 pm    Post subject: Re: Print preview with non standard paper size Reply with quote



Thanks for your comments but I still can't solve it. I have made my own
comments below - are you able to shed any more light on it for me?


"Trevor Keegan" <tkeegan (AT) first (DOT) net.my> wrote

Quote:
Hello Lorne,

I want to print to a custom form that is not a standard size. How do I
get
the rave preview to show the text on my custom page size which is 147mm
wide
by 100mm tall?
You should set your paper size to custom, then set the size of the custom
sheet in the printer settings.

I think this is what I was trying to do with SetPaperSize, however if you
mean I should set it at design time then I do not think it will help since
all reports except 1 are A4 standard paper. I just need run time code to
switch it for this one report. I have since tried SetPaperSize in the
beforeprint event handler of RvSystem but still no luck. I can't even
change it to another standard size like dmpaper_letter.

Quote:

I also need to print it on printers that centre the paper in the paper
feeder - at the moment the text prints on the left assuming A4 paper is
loaded so it only works if the custom paper is loaded on the left side of
the paper feeder.
You should set the anchors of the dataregion so that it will centre on the
page

If I set the data to print in the middle of the page it will work on
printers that centre the paper in the paper feeder but not on most inkjets
that always feed the paper on the left of the feeder. I have to set the
paper size for it to work correctly in all cases.

Quote:

There appears to be a rave function SetPaperSize(Size: integer; Width:
double; Height: double):boolean; but I can't get it to work so I am
looking
for another way to do it or instruction on how to get SetPaperSize to
work.
What version of Rave are you using.....IIRC there was a problem with this
that was fixed in version 5.x.x

My original email said I was using rave 5.1.3 - is this before or after the
error was corrected? I can't find a reference to it on the nevrona site.
If I have got the faulty verson can I edit the source or is the fix too
complicated and hence needing an upgrade?

Quote:

Regards
Trevor Keegan





Back to top
Trevor Keegan
Guest





PostPosted: Tue Mar 08, 2005 12:24 am    Post subject: Re: Print preview with non standard paper size Reply with quote

Quote:
I think this is what I was trying to do with SetPaperSize, however if you
mean I should set it at design time then I do not think it will help since
all reports except 1 are A4 standard paper. I just need run time code to
switch it for this one report. I have since tried SetPaperSize in the
beforeprint event handler of RvSystem but still no luck. I can't even
change it to another standard size like dmpaper_letter.

If you are using the RAVE Project, you should be able to set the paper size
to Custom which will instruct RAVE to use the custom size paper that you
define in the Printer Control Panel. This means that the user can
potentially change the size of the paper at anytime.
A similar approach is to set the Paper size to 'Default' which then means
that RAVE will use the paper settings that the user selects just prior to
printing.

Quote:
I also need to print it on printers that centre the paper in the paper
feeder - at the moment the text prints on the left assuming A4 paper is
loaded so it only works if the custom paper is loaded on the left side
of
the paper feeder.
You should set the anchors of the dataregion so that it will centre on
the
page

If I set the data to print in the middle of the page it will work on
printers that centre the paper in the paper feeder but not on most inkjets
that always feed the paper on the left of the feeder. I have to set the
paper size for it to work correctly in all cases.

Do you mean that you want it to print on the left for Deskjets and centered
for other printers? If this is the case your best option would be to modify
the report (using code to access the report components) just prior to
printing to altering the anchoring.

Quote:
There appears to be a rave function SetPaperSize(Size: integer; Width:
double; Height: double):boolean; but I can't get it to work so I am
looking
for another way to do it or instruction on how to get SetPaperSize to
work.
What version of Rave are you using.....IIRC there was a problem with
this
that was fixed in version 5.x.x

My original email said I was using rave 5.1.3 - is this before or after
the
error was corrected? I can't find a reference to it on the nevrona site.
If I have got the faulty verson can I edit the source or is the fix too
complicated and hence needing an upgrade?

Sorry I skipped over that part.....IIRC the problem was correct in a later
version, and affected the SetPageSize function (i.e. changing the page size
had no effect).

HTH

Regards
Trevor Keegan



Back to top
Lorne
Guest





PostPosted: Tue Mar 08, 2005 1:17 am    Post subject: Re: Print preview with non standard paper size Reply with quote


"Trevor Keegan" <tkeegan (AT) first (DOT) net.my> wrote

Quote:
I think this is what I was trying to do with SetPaperSize, however if you
mean I should set it at design time then I do not think it will help
since
all reports except 1 are A4 standard paper. I just need run time code to
switch it for this one report. I have since tried SetPaperSize in the
beforeprint event handler of RvSystem but still no luck. I can't even
change it to another standard size like dmpaper_letter.

If you are using the RAVE Project, you should be able to set the paper
size
to Custom which will instruct RAVE to use the custom size paper that you
define in the Printer Control Panel. This means that the user can
potentially change the size of the paper at anytime.
A similar approach is to set the Paper size to 'Default' which then means
that RAVE will use the paper settings that the user selects just prior to
printing.

I can't afford to rely on users selecting the paper size.

They just hit print and assume it is correct, and in any case this will not
solve the problem of how to show it as a preview on the correct paper.
Anyway they can't set paper to a custom size without me giving them
instruction on how to do it and assuming they read the instruction and
assuming they will spend the time to do it rather than just getting annoyed
and they then remember to reset it to A4 for the next page so I really do
want to set the paper size in my code.

Quote:

I also need to print it on printers that centre the paper in the paper
feeder - at the moment the text prints on the left assuming A4 paper
is
loaded so it only works if the custom paper is loaded on the left side
of
the paper feeder.
You should set the anchors of the dataregion so that it will centre on
the
page

If I set the data to print in the middle of the page it will work on
printers that centre the paper in the paper feeder but not on most
inkjets
that always feed the paper on the left of the feeder. I have to set the
paper size for it to work correctly in all cases.

Do you mean that you want it to print on the left for Deskjets and
centered
for other printers? If this is the case your best option would be to
modify
the report (using code to access the report components) just prior to
printing to altering the anchoring.

No, I want to format it to be in the correct place on my custom form (which
is pre-printed with some text so I have to put my output in the correct
location) irrespective of whether the user loads the form into a printer
that centres the paper in the feeder or puts it in a printer that alligns it
to the left (or even puts it in a printer that alligns on the right that may
happen in some Arab countries). If the paper size is reset to the form size
the positioning will happen automatically.

Quote:

There appears to be a rave function SetPaperSize(Size: integer; Width:
double; Height: double):boolean; but I can't get it to work so I am
looking
for another way to do it or instruction on how to get SetPaperSize to
work.
What version of Rave are you using.....IIRC there was a problem with
this
that was fixed in version 5.x.x

My original email said I was using rave 5.1.3 - is this before or after
the
error was corrected? I can't find a reference to it on the nevrona site.
If I have got the faulty verson can I edit the source or is the fix too
complicated and hence needing an upgrade?

Sorry I skipped over that part.....IIRC the problem was correct in a later
version, and affected the SetPageSize function (i.e. changing the page
size
had no effect).

Are you saying my version is the one with faulty code?

Quote:

HTH

Regards
Trevor Keegan





Back to top
Lorne
Guest





PostPosted: Tue Mar 08, 2005 1:20 am    Post subject: Re: Print preview with non standard paper size Reply with quote

Kevin,

Many thanks for trying to help but I have just got a reply from Nevrona to
say my code (version 5.1.3) does not contain the update so it will not work
whatever we do !!!!!!!!!

I will get the update and hopefully that will solve it.



"Trevor Keegan" <tkeegan (AT) first (DOT) net.my> wrote

Quote:
I think this is what I was trying to do with SetPaperSize, however if you
mean I should set it at design time then I do not think it will help
since
all reports except 1 are A4 standard paper. I just need run time code to
switch it for this one report. I have since tried SetPaperSize in the
beforeprint event handler of RvSystem but still no luck. I can't even
change it to another standard size like dmpaper_letter.

If you are using the RAVE Project, you should be able to set the paper
size
to Custom which will instruct RAVE to use the custom size paper that you
define in the Printer Control Panel. This means that the user can
potentially change the size of the paper at anytime.
A similar approach is to set the Paper size to 'Default' which then means
that RAVE will use the paper settings that the user selects just prior to
printing.

I also need to print it on printers that centre the paper in the paper
feeder - at the moment the text prints on the left assuming A4 paper
is
loaded so it only works if the custom paper is loaded on the left side
of
the paper feeder.
You should set the anchors of the dataregion so that it will centre on
the
page

If I set the data to print in the middle of the page it will work on
printers that centre the paper in the paper feeder but not on most
inkjets
that always feed the paper on the left of the feeder. I have to set the
paper size for it to work correctly in all cases.

Do you mean that you want it to print on the left for Deskjets and
centered
for other printers? If this is the case your best option would be to
modify
the report (using code to access the report components) just prior to
printing to altering the anchoring.

There appears to be a rave function SetPaperSize(Size: integer; Width:
double; Height: double):boolean; but I can't get it to work so I am
looking
for another way to do it or instruction on how to get SetPaperSize to
work.
What version of Rave are you using.....IIRC there was a problem with
this
that was fixed in version 5.x.x

My original email said I was using rave 5.1.3 - is this before or after
the
error was corrected? I can't find a reference to it on the nevrona site.
If I have got the faulty verson can I edit the source or is the fix too
complicated and hence needing an upgrade?

Sorry I skipped over that part.....IIRC the problem was correct in a later
version, and affected the SetPageSize function (i.e. changing the page
size
had no effect).

HTH

Regards
Trevor Keegan





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (RaveReports) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.