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("CrystalRuntime.Application"
_bstr_t FileName("d:\\test.rpt"
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
I work in Visual C++ and i use RDC.
My code is this:
------
#import <craxdrt.dll>
------
CRAXDRT::IApplicationPtr pApplication;
CRAXDRT::IReportPtr pReport;
pApplication.CreateInstance("CrystalRuntime.Application"
_bstr_t FileName("d:\\test.rpt"
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