Hi,
I cannot print twice using this active X
Here is a Code sample:
Private Sub Command1_Click()
Me.PDFCreactiveX1.Open "C:\test\TransactionRPT.pdf", ""
Call Me.PDFCreactiveX1.Print("", False)
Call Me.PDFCreactiveX1.Print("", False)
End Sub
On second call, it failed giving me this message:
Runtime error '-2147467259 (80004005)': Method 'Print' of object 'IPDFCreativeX' failed
Is there a way to reset it, I try method initblank... but still giving me error
Thanks for the hint
Rod Custeau
Printing twice with PDF CreativeX component
Well,
It's a property, not a parameter:
With your code it give me an Invalid use of property.
It's better this way :But, prints only once, and I still can't do what I want:
Imagine I'm looping through a recordset to print all the transaction that occured on an Item to print them in batch: Here is a code Sample. If there is no pdf for this transaction we print the current report. Look in the else part of the if...
Can I have an old release of the control ?
Thanks
It's a property, not a parameter:
With your code it give me an Invalid use of property.
It's better this way :
Code: Select all
Me.PDFCreactiveX1.Copies = 2
Imagine I'm looping through a recordset to print all the transaction that occured on an Item to print them in batch: Here is a code Sample. If there is no pdf for this transaction we print the current report. Look in the else part of the if...
Code: Select all
' Ask for printing in batch
vbAnswer = MsgBox(GetSysMessage(670), vbYesNo + vbDefaultButton2 + vbQuestion, GetSysMessage(2033))
If vbAnswer = vbYes Then
' for each record
Me.SubmissionItemTransSubf.Form.RecordsetClone.MoveFirst
Do Until Me.SubmissionItemTransSubf.Form.RecordsetClone.EOF
If LoadPDF(Me.SubmissionItemTransSubf.Form.RecordsetClone!TRANSACTIONID) = 0 Then
GetDefaultRptTransac Me.SubmissionItemTransSubf.Form.RecordsetClone!TYPE, strRptName, strLabel
sngStep = 3
strCondition = "TransactionID = " & Me.SubmissionItemTransSubf.Form.RecordsetClone!TRANSACTIONID
intReturn = PrintReport(strRptName, acNormal, "", strCondition, 1)
strCondition = ""
Else
Me.objPDF.OpenPDF gstrCurrentBARDERPDir & "\Temp\TransactionRpt.pdf", ""
Me.objPDF.PrintPDF "", False
End If
Me.SubmissionItemTransSubf.Form.RecordsetClone.MoveNext
Loop
End If
Thanks