p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Parameter Passing


Message #1 by "Vimal Bhuptani" <vimal_bhuptani@r...> on 19 Jun 2002 15:58:19 -0000
Dear Friends,

I have created one report with 5 Parameters such as
 FromDate  of type Date
ToDate    of type Date
cust_code of type Number
cname     of type String
cadd      of type String,

i have saved this file as a Master.rpt
and i am creating one Sub Report and that sub report i am 
inserting it in Master.rpt.   The subreport file name is 
child.rpt.

and in the subreport i have 3 parameters such as
 FromDate  of type Date
ToDate    of type Date
cust_code of type Number


and in my Visual Basic Form. i am entering
 From Date, To Date and the Customer Code.
and those values i am assigning to the parameters in Master.rpt 
such as
CrystalReport1.ParameterFields(0) = "FromDate;"
CrystalReport1.ParameterFields(1) = "ToDate;"
etc.. till the CADD.

and i want this same FromDate, ToDate and the Cust_code  values to 
effect in my subreport's parameter.. so how do i do it..
if any one knows then pls send me with a example.. i am using 
Crystal Report Version 7.

waiting for ur reply
Regards
Vimal

_________________________________________________________
There is always a better job for you at Monsterindia.com.
Go now http://monsterindia.com/rediffin/

Message #2 by "Tung Dang" <tdan@h...> on Wed, 19 Jun 2002 14:19:03 -0400
how are you linking your main report to your subreport.  Shouldn't 
linking the fields work in this case?

-----Original Message-----
From: Vimal Bhuptani [mailto:vimal_bhuptani@r...]
Sent: Wednesday, June 19, 2002 11:58 AM
To: crystal_reports
Subject: [crystal_reports] Parameter Passing


Dear Friends,

I have created one report with 5 Parameters such as
 FromDate  of type Date
ToDate    of type Date
cust_code of type Number
cname     of type String
cadd      of type String,

i have saved this file as a Master.rpt
and i am creating one Sub Report and that sub report i am
inserting it in Master.rpt.   The subreport file name is
child.rpt.

and in the subreport i have 3 parameters such as
 FromDate  of type Date
ToDate    of type Date
cust_code of type Number


and in my Visual Basic Form. i am entering
 From Date, To Date and the Customer Code.
and those values i am assigning to the parameters in Master.rpt
such as
CrystalReport1.ParameterFields(0) =3D "FromDate;"
CrystalReport1.ParameterFields(1) =3D "ToDate;"
etc.. till the CADD.

and i want this same FromDate, ToDate and the Cust_code  values to
effect in my subreport's parameter.. so how do i do it..
if any one knows then pls send me with a example.. i am using
Crystal Report Version 7.

waiting for ur reply
Regards
Vimal

_________________________________________________________
There is always a better job for you at Monsterindia.com.
Go now http://monsterindia.com/rediffin/


Message #3 by "Wong Tze Lun" <tzelun0502@l...> on Thu, 20 Jun 2002 01:24:49 +0700
Hi Vimal
  If u don't want the sub report to prompt out the parameter for u when u try to call hte report why not try used the formula and
pass in to the sub report. you can declared shared variable to be used within the reportt and sub report

regards
tl wong



_________________________________________
Communicate with others using Lycos Mail for FREE!
http://mail.lycos.com/
Message #4 by Leonardo Xiao <lxiao@a...> on Wed, 19 Jun 2002 11:26:05 -0700
Dear All,

I'm using parameter fields in the Record Selection Formula. Because both
main and subreport have FromDate and ToDate, how can I pass the parameters
to main report and let the main report pass them to subreport?

I was thinking of using shared variables, but got an error message said "A
'shared' variable can only be used while printing records".

Thanks,
Leo

P/s I'm using Crystal Reports 8.5 and ASP.

-----Original Message-----
From: Tung Dang [mailto:tdan@h...]
Sent: Wednesday, June 19, 2002 11:19 AM
To: crystal_reports
Subject: [crystal_reports] RE: Parameter Passing


how are you linking your main report to your subreport.  Shouldn't linking
the fields work in this case?

-----Original Message-----
From: Vimal Bhuptani [mailto:vimal_bhuptani@r...]
Sent: Wednesday, June 19, 2002 11:58 AM
To: crystal_reports
Subject: [crystal_reports] Parameter Passing


Dear Friends,

I have created one report with 5 Parameters such as
 FromDate  of type Date
ToDate    of type Date
cust_code of type Number
cname     of type String
cadd      of type String,

i have saved this file as a Master.rpt
and i am creating one Sub Report and that sub report i am 
inserting it in Master.rpt.   The subreport file name is 
child.rpt.

and in the subreport i have 3 parameters such as
 FromDate  of type Date
ToDate    of type Date
cust_code of type Number


and in my Visual Basic Form. i am entering
 From Date, To Date and the Customer Code.
and those values i am assigning to the parameters in Master.rpt 
such as
CrystalReport1.ParameterFields(0) = "FromDate;"
CrystalReport1.ParameterFields(1) = "ToDate;"
etc.. till the CADD.

and i want this same FromDate, ToDate and the Cust_code  values to 
effect in my subreport's parameter.. so how do i do it..
if any one knows then pls send me with a example.. i am using 
Crystal Report Version 7.

waiting for ur reply
Regards
Vimal

_________________________________________________________
There is always a better job for you at Monsterindia.com.
Go now http://monsterindia.com/rediffin/



Message #5 by "Wong Tze Lun" <tzelun0502@l...> on Thu, 20 Jun 2002 01:39:20 +0700
hi learnordo,
  when you declared the shared variables u have to include the 
whileprinting function so it twill only ask the crystal to execute during printing that time. you can also try whilereading or
executeafter both this control will bring different result to your crytsal output

regards
tl wong



_________________________________________
Communicate with others using Lycos Mail for FREE!
http://mail.lycos.com/
Message #6 by "Vimal Bhuptani" <vimal_bhuptani@r...> on 20 Jun 2002 11:35:04 -0000
But how do i declare the Shared Variable...
and whether in Selection Formula or in a separate Formula..


if possible pls send me with an example. of how to pass with a 
Variable. .with the parameter..

waiting for ur reply

Vimal

On Wed, 19 Jun 2002 Wong Tze Lun wrote :
>Hi Vimal
>   If u don't want the sub report to prompt out the parameter for 
>u when u try to call hte report why not try used the formula and 
>pass in to the sub report. you can declared shared variable to be 
>used within the reportt and sub report
>
>regards
>tl wong
>
>
>
>_________________________________________
>Communicate with others using Lycos Mail for FREE!
>http://mail.lycos.com/
>

_________________________________________________________
There is always a better job for you at Monsterindia.com.
Go now http://monsterindia.com/rediffin/

Message #7 by "Wong Tze Lun" <tzelun0502@l...> on Sat, 22 Jun 2002 00:13:21 +0700
hI vimal
 you can decalred it a seperate formula example in your group header you declared shared nunmbervar Num then in your detail report
when u want to use this variables just simply deecalred it again 
nunmbervar Num then it should be work.Try use the whileprinting; beforedecalred the variables

regards
tl wong


_________________________________________
Communicate with others using Lycos Mail for FREE!
http://mail.lycos.com/

  Return to Index