Link to home
Start Free TrialLog in
Avatar of omarmallat
omarmallatFlag for United Arab Emirates

asked on

set thecrystal printer report width and height using vb????

Hi to all
can I change the width and length properties for a crystal report.
Ex: when I create the crystal file, I set the page setup to A4. but in some case I want to set it to Letter 8.5/11 inch, or a custom value.
can I change these property from code using vb??
and Is there any function to let the crystal choose the printer?? because by default it print on the default printer.. I know how to set the windows default printer using vb, but of course, it is better if I can choose the printer from crystal... and let the windows away :)
and thanks to all ...
ASKER CERTIFIED SOLUTION
Avatar of Elmo_
Elmo_
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of omarmallat

ASKER

thank you for your description, but I want to set the width and Length, not the top,bottom,left,right..

more description:
if the paper was not an A4, (example:attached paper, or role for a dot matrix printer) so If the length is not = length of the paper, a diffrence will appear in the second paper, and will increase or decrease after each paper.
now I have to change all the report file every time the paper size change. I want to get over this problem, if I can set the paper size, not the paper margin.. and sorry.
but for the pronter selection, it's very good.
omarmallat,

The only thing that I can see to adjust the paper size is the Margin settings.  When you initially create your report you set it up as you wish it to look.  

I do not think that there are any commands in VB to allow you to change the paper size.  These are things that you have to select when you create your report.  

This could be to do with the limits of the printer. You may need to select a dot matrix printer so that you can create a report for that size paper.  (We only have A4 printers so that is the biggest page size that I have been able to select)

The only way to set the paper size that I can see is to do it manually through crystal reports (When creating your report) and this will allow you to increase the margin sizes within the pages limit.

Cheers,

Ed.
Avatar of Mike McCracken
Mike McCracken

listening
are you sure that I will can not set the paper Width and Length?
Do I wait for any other comment? or you are sure???
omarmallat,

I cannot see any other properties that would allow you to change the width or length of the of the report and I have checked all the properties that relate to the Crystal Report Control.

I am Fairly sure about this as I have checked it thoroughly and could find nothing.  It would also indicate to me that it is not possible as when you create your report You select the page size.  Crystal reports needs to have a printer driver installed on the computer when creating reports.  (If you don't you will get a notification email everytime you start crystal Report  designer) This is why my maximum page size is only A4.  If you had a larger printer, crystal reports may allow you to select a different paper size thenn allowing you to define larger margins.

Hope this helps,

Ed.
Thank you Elmo