p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Stored Procedure Parameter-Urgent


Message #1 by feros khan <s_feroskhan@y...> on Tue, 26 Nov 2002 12:11:51 -0800 (PST)
When I am passing stored procedure parameter at
runtime from Vb to crystal report it is displaying
"Invalid Parameter fields run time error -20553"

I have two parameter fields in Stored procedure
Parameter1,Modescr. I am using SQL server
database.Crystal Report 7.

I am using the following code to pass parameter.

Crystalreport1.parameterfields(0)="Parameter1;1;True"
Crystalreport1.Parameterfields(1)="Modescr;1;True"

when I run the program it is displaying Runtime error
and INvalid Parameter fields.

Then I wrote the following code.


Crystalreport1.storedprocParam(0)="1"
CrystalReport1.storedProcParam(1)="E"

Then No error, but parameter is not passed. when i run
this program It is prompted to dialog box, it is
asking paramter1,Modescr value.
What I need, the dialog box shouldnot appear, the
parameter values Should be direvtly assigned to
parameter.

with regards
S.Feros khan



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Message #2 by Dheeraj Singh <Dheeraj.Singh@b...> on Wed, 27 Nov 2002 07:09:28 +0200
Hi

are you using a crystal viewer or crystal report control to view your
reports

report control:
    
'date parameter     
    CrystalReport1.ParameterFields(i) = "DateParam;Date(" & Text2.Text &
");True"   
'DateTime
    CrystalReport1.ParameterFields(i) = "DateTimeParam;Date(" & Text3.Text &
")Time(" & Text4.Text & ");True"
'Number var
    CrystalReport1.ParameterFields(i) = "NumberParam;" & NumVar & ";True"
'String var
    CrystalReport1.ParameterFields(i) = "StringParam;" & Text6.Text &
";True"



crystal viewer:
CrystalReport1.ParameterFields(i) addcurrentvalue(text1.text)


-----Original Message-----
From: feros khan [mailto:s_feroskhan@y...]
Sent: Tuesday, November 26, 2002 10:12 PM
To: crystal_reports
Subject: [crystal_reports] Stored Procedure Parameter-Urgent


When I am passing stored procedure parameter at
runtime from Vb to crystal report it is displaying
"Invalid Parameter fields run time error -20553"

I have two parameter fields in Stored procedure
Parameter1,Modescr. I am using SQL server
database.Crystal Report 7.

I am using the following code to pass parameter.

Crystalreport1.parameterfields(0)="Parameter1;1;True"
Crystalreport1.Parameterfields(1)="Modescr;1;True"

when I run the program it is displaying Runtime error
and INvalid Parameter fields.

Then I wrote the following code.


Crystalreport1.storedprocParam(0)="1"
CrystalReport1.storedProcParam(1)="E"

Then No error, but parameter is not passed. when i run
this program It is prompted to dialog box, it is
asking paramter1,Modescr value.
What I need, the dialog box shouldnot appear, the
parameter values Should be direvtly assigned to
parameter.

with regards
S.Feros khan



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


  Return to Index