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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Orientation of paper in VC++

Status
Not open for further replies.

dattero

Technical User
Mar 5, 2001
8
IT
I have a problem with the orientation of my paper.
I work in Visual C++ and i use RDC.

My code is this:

------
#import <craxdrt.dll>
------

CRAXDRT::IApplicationPtr pApplication;
CRAXDRT::IReportPtr pReport;
pApplication.CreateInstance(&quot;CrystalRuntime.Application&quot;);
_bstr_t FileName(&quot;d:\\test.rpt&quot;);
pReport = pApplication->OpenReport(FileName);
pReport->PaperOrientation = CRAXDRT::crLandscape;
m_viewer.SetReportSource(pReport);
m_viewer.ViewReport();


The problem is that the paper orientation is always Portrait, because this is the orientation of the Default Printer. If i set my Printer to landscape, all the reports are printed into landscape mode. This is not the solution...

I made a Project in Visual Basic and all work correctly...in Visual C++ nothing....

Thanks for your help!

Marco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top