Click to See Complete Forum and Search --> : Legal/Landscape Printing (revisited)


MC Henning
June 14th, 2001, 10:09 PM
Am frustrated by a persistent problem -- in a simple project that uses DataReport to display DataEnvironment output, print preview fails with the "report width too large" error because the design-time DataReport ReportWidth + LeftMargin + RightMargin > 11" (totals 19620 twips).

Have installed VS 6 SP5, and included this code in the command click event that invokes the print preview:

Printer.PaperSize = vbPRPSLegal
DataReport1.Orientation = rptOrientLandscape
DataReport1.Refresh
DataReport1.Show

Works like a champ if I manually reset the default document's Paper Size to Legal, but shouldn't it be enough to programmatically reset it?

Have seen an interesting suggestion for using IE to preview, but would *really* like to get this working within DataReport. Gurus, any ideas are SOOOO appreciated!

Thanks,
MC

MC Henning
June 19th, 2001, 03:29 PM
Replying to this message in hopes of bubbling it up to top of the list. Truly, folks -- I believe that the code in first message is set up to correctly change the printer pagesize and DataReport orientation, so that it overrides the default printer settings. Is there something I've forgotten here?

Appreciate your help in this!

Sincerely,
Mary

sachinbobde
June 28th, 2001, 12:35 PM
Hello Sir

Tnx for going through my solution of IE preview. Theres nothing that U have missedout there in UR code but the thing is that Microsoft has missedout large things in Data Report. It is a simple and quick reporting tool but it lacks flexibility.

Changing the paper orientation and all that thing doesnt work with datareport. If U want to do that U will have to do it to the system printer by some other methods may be some system manipulation.
Why dont U try out IE solution its great and not too difficult, I'll not say too simple also. Even I have faced this problem for long time and finally found out this alternate solution.
All the best!

Sachin Bobde (Nagpur INDIA sgbobde@nagpur.dot.net.in
sachinbobde@hotmail.com)