Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem when printing

Status
Not open for further replies.

Greenleaf

Programmer
Feb 14, 2002
93
IT
Hello,
I'm previewing my report with CrPreview. Everything's fine. If I choose to print the preview with paper size A3 , the images are displayed fine, if I print in A4 the images are too big to fit the page. Is there a way to print the images properly according the paper size? I' d like the images to "shrink" authomatically in order to fit the page if they are too big.
 
Please post your software/version, and whatever development language you are using.

If you only have two choices, then render the 2 sixed graphics you need and conditionally suppress them based on the page size.

One problem when programtically resizing images is that you lose resolution, so this is a good cheat.

-k
 
I use Crystal Reports XI developer edition and development language us Delphi 7
 
Yes, Crystal Reports can be such a pain, at least for me. But wouldn' t it be possible to be more general and not to be restricted to 2 papersize only. Here at work they have requested me not to use specific numbers. Is there a way to retrieve information from the printer? Or say, choose paper size by means of a dialog window and then have the picture resized according to the paper size?
I hate Crystal so so much... :-(
 
Hi,
Blaming Crystal for something no report generator ( as far as I konw) can do is a little harsh..Graphics are difficult to handle in any case, since pixel depth, display resolution , etc are very client dependent and expecting some magic process to know how to resize on demand ( while maintaining the correct aspect ratio) is, in my humble opinion, unreasonable.

Software is rarely able to overcome unrealistic constraints on good design.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
yes but I saw that for vb.net there is a method for the crviewer and it is called bestfitpage but in the delphi component there is not such a method.
 
I'm trying this way.

printdialog1.execute;
picture.width := printer.pagewidth;

and to this point it works; if I choose different paper formats the printer.pagewidth changes but...the last line

crreport.printout(False,1,False,1,1);

ruins everything; if with printdialog I choose A3 che crreport.printout prints in A4; it completely ignores what I chose.
 
It's unbelivable. I downloaded and installed the horfix recommended by BusinessObjects regarding the method crreport.printout. Apparently there was a bug in that method but the hotfix doesn't work; and even the code I posted ini the previous post doesnt' work anymore. Now I have to write:

crreport.setUpPrinter(0);
picture.width := printer.pagewidth;
crreport.printout(False,1,False,1,1);

the paper size changes but now it's the picture width that doesn't change. Printer.pagewidth is always the same, no matter what I chose. How can I get out of this stuck?!? Has anybody have ever faced this problem???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top