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

Error printing to Adobe pdf Writer from Crystal RDC

Status
Not open for further replies.

klgrube

Programmer
May 29, 2002
28
US
Hi!

I have a MS Access form which includes the Crystal Reports RDC Activex control. When a user clicks on a report title on the main menu, the report opens in the Crystal viewer quite nicely. I have included a printer control icon on the form so the user can change the printer as they require.

I am running Crystal Reports 8.5 and Access 2000. I am using the most current version of the RDC, and I believe the most current version of the Adobe Acrobat pdf writer printer driver.

When the user chooses the Acrobat PdfWriter in the printer dialogue box, the following error occurs:

"Run-time error '-2147191166 (80047682)':
Page Header plus Page footer is too large for the Page"


In the report itself, the margins are set for .35" on all sides, and the pdf writer is set for .25". The report itself actually consists of 6 subreports, each set in a report header section. However, the report opens and runs well - and even prints to the pdf writer - on other workstations.

Any suggestions as to what might be causing this report to fail on this particular user's workstation? She is also one of the few people who has a local printer as well as being connected to our network printers. Is there anything else I can do in the code below to prevent this from happening? Is it likely that she just needs to have the pdf writer driver reinstalled? Is there some change that I need to make to the report itself? There was an earlier thread on this issue, but no one ever responded. Please let me know if you know of a solution for this problem.

Here is my code the form that executes the report within the viewer.

===========================================================

Option Compare Database
Option Explicit

' Declaration of the application object

Public crxApplication As New CRAXDRT.Application
Public crxReport_CompleteSet As CRAXDRT.Report
Public MyReportFile_CompleteSet As String
Public crxParameters_CompleteSet As CRAXDRT.ParameterFieldDefinitions
Public crxParameter_CompleteSet As CRAXDRT.ParameterFieldDefinition
---------------------------------------------------------
Private Sub CRViewer_CompleteSet_PrintButtonClicked(UseDefault As Boolean)

UseDefault = False
crxReport_CompleteSet.PrinterSetup (Hwnd)
crxReport_CompleteSet.PrintOut (True)

End Sub


-----------------------------------------------------------
Private Sub Form_Load()

'Ask for Report Date

DoCmd.Maximize

MyReportFile_CompleteSet = "G:\Accounting\Databases\RedevelopmentPipeline\CrystalReports\CompleteSet.rpt"

Me!CRViewer_CompleteSet.Top = 0
Me!CRViewer_CompleteSet.Left = 0
Me!CRViewer_CompleteSet.Height = 9500
Me!CRViewer_CompleteSet.Width = 15000

Set crxReport_CompleteSet = crxApplication.OpenReport(MyReportFile_CompleteSet)

Dim dtReportDate As Date

dtReportDate = InputBox("Enter the report date (format: 1/1/2000):", "ReportDate")

DoCmd.SetWarnings False
Call AffiliateConcatenation
DoCmd.SetWarnings True

'Set report date Parameter

Set crxParameters_CompleteSet = crxReport_CompleteSet.ParameterFields
Set crxParameter_CompleteSet = crxParameters_CompleteSet.Item(1)
crxParameter_CompleteSet.EnableNullValue = True
crxParameter_CompleteSet.SetCurrentValue dtReportDate


Me!CRViewer_CompleteSet.ReportSource = crxReport_CompleteSet
Me!CRViewer_CompleteSet.DisplayGroupTree = False
Me!CRViewer_CompleteSet.EnableGroupTree = False
Me!CRViewer_CompleteSet.EnableZoomControl = True
Me!CRViewer_CompleteSet.EnablePrintButton = True
Me!CRViewer_CompleteSet.ViewReport

While Me!CRViewer_CompleteSet.IsBusy
DoEvents
Wend

End Sub

-----------------------------------------------------------
Private Sub Form_Unload(Cancel As Integer)

'Destroy the report object

Set crxReport_CompleteSet = Nothing

End Sub
 
Hi,

I have the same problem. With a slightly different scenario.

I want to know what that error message means because I don't think it's a format problem. I went into the report and change the settings everywhere but the problem doesn't go away. I'm also using Crystal Reports 8.5 but with MsSQL server. I'm wondering whether it's a defect in this version of Crystal.
 
Hi,

LOL

I hate it when this happens: finding the solution right after I post a message.

Anyway, the problem might be with your printer driver. I re-installed mine and it works fine now. This was weird because I couldn't even preview my report. I never chose any printing options.

Try re-installing your printer driver then. It might help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top