on 08-23-2011 9:05 PM
Hi to all, I need to know what's the way to print standart reports developed in crystal report tht SAPBO 8.8.1 includes using vb.net. I trying using the standart function printtoprinter and can't do it.
I'm using crystal reports dll's V 10.2.3600.
thanks,
Ezequiel.
Hi Ezequiel,
What is the request to print report by program? In what event you want to trigger it?
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gordon, thanks for your answer.
I'm getting the invoice report in Crystal from the default invoice report layout and save this file in .rpt file and trying to print by code calling the sub attached on itempressed event in my user form and getting this error.
Error in File C:\Users\ecomba\AppData\Local\Temp\5\ARInvoiceStandartSap {300B9A68-DF05-4D7B-8F3B-1670A4493BEE}.rpt:
Error in formula <remarkOffset>.
'Shared numberVar SectionTotalMaxHeght;
'
A number, currency amount, boolean, date, time, date-time, or string is expected here.
I referenced this dlls CrystalDecisions.CrystalReports.Engine.dll, CrystalDecisions.CrystalReports.Shared, version 10.2.3600
Private Sub DisplayThreadReportSeq()
Dim oView As New frmViewReport
Dim strReportPath As String = ""
Dim strParamName As String = ""
Try
Dim CR As New ReportDocument
CR.Load(oReport.CrstPath)
'
' Declare the parameter related objects.
'
SetReportValues(CR)
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
'
' Get the report's parameters collection.
'
For Each oPar As cslParam In oReport.Params
crParameterFieldDefinitions = CR.DataDefinition.ParameterFields
crParameterFieldLocation = crParameterFieldDefinitions.Item(oPar.ParName)
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = oPar.Value
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
Next
If pPrint Then
If oReport.Printer "" Then
CR.PrintOptions.PrinterName = oReport.Printer
End If
CR.PrintToPrinter(IIf(oReport.Copies = "", 1, oReport.Copies), False, 0, 0)
SBO_Application.StatusBar.SetText("Printed Document Successfully", SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
Else
oView.Text = pReport
oView.TopMost = True
oView.Viewer.ReportSource = CR
oView.Hide()
oView.ShowDialog()
End If
Catch ex As Exception
Util_GenErrorLog("DisplayReport", ex)
End Try
End Sub
I understand Why I get this error, because this report is printting in SAP.
Thanks,
Ezequiel.
Hi All,
It's Possible to do?, Please help me I need solve this problem urgently.
Thanks,
Ezequiel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.