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

ActiveX viewer skews A4 reports

Status
Not open for further replies.

DanWalter

Programmer
Nov 29, 2000
58
0
0
US
Hi:
I'm distributing CR 10.0 reports. These reports contain some text boxes. The problem is that when the report is viewed in the ActiveX viewer, some of the text boxes shift position. If the report is sent straight to the printer, it prints fine. When the report is viewed in CR, it looks fine and prints fine. The problem would seem to be in the ActiveX previewer - it resizes or reshapes the report. I can't find any properties of the previewer that seem to relate to paper size or margins. Is there some property of the report (other than PaperSize) that should be manipulated before it is loaded into the previewer?

Sample code from Visual FoxPro:

poReportApp = CREATEOBJECT("CrystalRuntime.APPLICATION.10")

* Always starting with the first report
THISFORM.CRViewer.EnableGroupTree = .F.
THISFORM.CRViewer.DisplayGroupTree = .F.
THISFORM.CRViewer.EnableRefreshButton = .F.
* Be sure this "powered by crystal" stupid thing is off - it whacks out the nav buttons!
THISFORM.CRViewer.EnableCloseButton = .F.
THISFORM.CRViewer.EnableHelpButton = .F.
THISFORM.CRViewer.EnableAnimationCtrl = .F.

THISFORM.CRViewer.EnableExportButton = .T.
THISFORM.CRViewer.EnableNavigationControls = .T.

* Display the report in the viewer
lcReportPath = paDispRptPath
* Open the report
poReportObject = poReportApp.OpenReport(paDispRptPath, 1)

* Manipulate the report
poReportObject.PaperSize= 9 && crPaperA4
poReportObject.PaperSource=7 && Automatic
poReportObject.VerifyOnEveryPrint= .F.

* Attach the report to the viewer control
THISFORM.CRViewer.Reportsource = poReportObject
* Display the report
THISFORM.CRViewer.ViewReport

TIA,
Dan


Dan Walter
Daniel.Walter@uvm.edu
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top