Avinash Desai
asked on
Crystal Report Error "Missing parameter values." while Printing
Dear all
I have a Windows service and I am passing the value to the Crystal report when the service is running .
After passing the value i am printing the report.
So i have written a code to pass the value and print the report.
Here is the code
Dim crReportDocument As VinPrint = New VinPrint
Dim SQLDM As New DataManager.SqlServerDataM anager
Dim DTable As New DataTable
DTable = SQLDM.GetDataTable("Select TABDNO 'Bodynumber' ,TAEGMD+ ' ' + TAEGNO 'Engine',TAKEYN 'KEY',JCEXTC 'Color',JCGWMI+JCGVDS+TAFR SQ + '~' + TAPRDM 'VIN' from F91TAF join F91JCF on TABDNO=JCBDNO where JCBDNO='" & Bodynumber & "'")
If DTable.Rows.Count > 0 Then
Try
' System.Diagnostics.Debugge r.Break()
crReportDocument.SetParame terValue(" Body", DTable.Rows(0).Item("Bodyn umber"))
crReportDocument.SetParame terValue(" Engine", DTable.Rows(0).Item("Engin e"))
crReportDocument.SetParame terValue(" Key", DTable.Rows(0).Item("KEY") )
crReportDocument.SetParame terValue(" Ecol", DTable.Rows(0).Item("Color "))
crReportDocument.SetParame terValue(" Vin", DTable.Rows(0).Item("VIN") )
crReportDocument.SetParame terValue(" suf", "TS")
' crReportDocument.SetParame terValue(" Body", DTable.Rows(0).Item("Suf") )
crReportDocument.Load()
crReportDocument.PrintToPr inter(1, False, 1, 1)
'doing some SQL operations on successful printing.
Catch ex As Exception
WriteToLogFile("Error while Printing " & ex.Message)
End Try
End If
In the line " crReportDocument.PrintToPr inter(1, False, 1, 1)" i get error Missing parameter values.
In Crystal report i have total 6 parameters.
Where am i going wrong please let me know the solution.
I have a Windows service and I am passing the value to the Crystal report when the service is running .
After passing the value i am printing the report.
So i have written a code to pass the value and print the report.
Here is the code
Dim crReportDocument As VinPrint = New VinPrint
Dim SQLDM As New DataManager.SqlServerDataM
Dim DTable As New DataTable
DTable = SQLDM.GetDataTable("Select
If DTable.Rows.Count > 0 Then
Try
' System.Diagnostics.Debugge
crReportDocument.SetParame
crReportDocument.SetParame
crReportDocument.SetParame
crReportDocument.SetParame
crReportDocument.SetParame
crReportDocument.SetParame
' crReportDocument.SetParame
crReportDocument.Load()
crReportDocument.PrintToPr
'doing some SQL operations on successful printing.
Catch ex As Exception
WriteToLogFile("Error while Printing " & ex.Message)
End Try
End If
In the line " crReportDocument.PrintToPr
In Crystal report i have total 6 parameters.
Where am i going wrong please let me know the solution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks
You may also need to check the parameter names. I found in a VB6 application that the names included the { } and the ?
mlmcc