Skip to Content
author's profile photo Former Member
Former Member

Problem when trying to print standart invoice crystal report for SAP

Hi All, I have the following problem when trying to print a system invoice report in crystal reports for SAP

I pass params and load the report using this code

Private Sub DisplayThreadReportSeq()

Dim oView As New frmViewReport

Dim strReportPath As String = ""

Dim strParamName As String = ""


Dim CR As New ReportDocument



' Declare the parameter related objects.



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




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)


oView.Text = pReport

oView.TopMost = True

oView.Viewer.ReportSource = CR



End If

Catch ex As Exception

Util_GenErrorLog("DisplayReport", ex)

End Try

End Sub

This code works fine when the report invoke to print is developed in crystal reports version for .net 2008 or .net 2005

when trying to print a report standart getting from SAP BO 8.8.1 using this code I getting the following error:

Error in File C:UsersecombaAppDataLocalTemp5ARInvoiceStandartSap {300B9A68-DF05-4D7B-8F3B-1670A4493BEE}.rpt:

Error in formula .

'Shared numberVar SectionTotalMaxHeght;


A number, currency amount, boolean, date, time, date-time, or string is expected here.

This report is the standart report that SAP 8.8.1 includes and works fine on SAP.

I referenced this dlls CrystalDecisions.CrystalReports.Engine.dll, CrystalDecisions.CrystalReports.Shared, version 10.2.3600

How I can get these dll´s version for Crystal Report 2008 for SAP Business one or How I can solve this problem

thanks in advance,


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 18, 2011 at 10:03 PM

    Hi All, please someone help me with this problem?.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 19, 2011 at 07:54 AM


    Change the report parameter type as string and check it .



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.