Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Confused Post Reply Post New Topic
Author Message
rpc86
Newbie
Newbie


Joined: 19 Jun 2008
Location: Philippines
Online Status: Offline
Posts: 1
Quote rpc86 Replybullet Topic: Confused
    Posted: 19 Jun 2008 at 2:28am
Hi guys,
 
I'm a new member on this forum.
 
I use VB.NET 2005 for Visual Studio 2005 IDE.  My problem is when I run my report with parameters.  My report has a stored procedure.  The connectivity (OLE DB) is my local computer.
 
When I run my report using my development machine, it works fine.  But when I change the log-on info of the report, it says, "expects parameter..."  Here is my code:
 

Public Sub LoadReportProduct(ByVal iSuppID As Integer)

Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table

Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo

Dim cbsmain As New CrystalReport1

For Each tbCurrent In cbsmain.Database.Tables

          tliCurrent = tbCurrent.LogOnInfo

          With tliCurrent.ConnectionInfo

               .ServerName = "myLocalServer"

              .DatabaseName = "Northwind"

         End With

         tbCurrent.ApplyLogOnInfo(tliCurrent)

Next tbCurrent

Dim pvCustPattern As New CrystalDecisions.Shared.ParameterValues()

Dim pdvCustPattern As New _

CrystalDecisions.Shared.ParameterDiscreteValue()

pdvCustPattern.Value = iSuppID

pvCustPattern.Add(pdvCustPattern)

cbsmain.DataDefinition.ParameterFields _

("@SupplierID").ApplyCurrentValues(pvCustPattern)

 

Form2.CrystalReportViewer1.ReportSource = cbsmain

Form2.Show()

End Sub

 
As you can see, the server name "myLocalServer" is defined and it works fine.  But when I change the Server Name into 'TheRealServer', it says
 
Procedure 'pr_ProductReport' expects parameter '@SupplierID' , which was not supplier
 
How can I solve this error?
 
 
Thank you.


Edited by rpc86 - 19 Jun 2008 at 2:32am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.