hi here this might hekp you
In Crystal Reports version 8 and 8.5 ASP applications main report parameters must be set on the main report and subreport parameters must be set on the subreport. Below is some example code for passing values to a main report and subreport.
-----------------------------------------------------------
In this example the report is seen as having 4 main report parameters and 2 subreport parameters.
Note: Subreport-linking parameters do not need to be set with version 8 and 8.5.
set ReportDatabase = Session("oRpt"

.Database
'Set the Table object and logon (1 table only)
set crdatabasetables = ReportDatabase.Tables
set crtable = crdatabasetables.Item(1)
crtable.SetLogonInfo "ODBCDSNname", "", cstr(userid), cstr(password)
'Create subreport database object, get table(s), login
set CRSubreports = session("oRpt"

.OpenSubReport("testsub.rpt"

set ReportDatabase2 = CRSubreports.Database
Set crdatabasetables2 = ReportDatabase2.tables
Set CRtable2 = crdatabasetables2.Item(1)
crtable2.SetLogonInfo "ODBCDSNname", "", cstr(userid), cstr(password)
'Get handles to parameters in main report (there are 2)
set Session("ParamCollection"

= Session("oRpt"

.Parameterfields
Set ThisParam1 = Session("ParamCollection"

.item(1)
Set ThisParam2 = Session("ParamCollection"

.item(2)
'Set values for the parameters
ThisParam1.SetCurrentValue cstr("paramvalue1"

,12
ThisParam2.SetCurrentValue cstr("paramvalue2"

,12
'Get handles to parameters in SUB report (there are 2)
set Session("SubRptParamCollection"

= CRSubreports.Parameterfields
Set ThisParam1 = Session("SubRptParamCollection"

.item(1)
Set ThisParam2 = Session("SubRptParamCollection"

.item(2)
'Set values for the parameters (these were previously set in the main report.
ThisParam1.SetCurrentValue cstr("paramvalue4"

,12
ThisParam2.SetCurrentValue cstr("paramvalue3"

,12
For more sample ASP applications to use as templates for your Crystal Reports web applications please download the file aspxmps8.exe (for version 8.0) or aspxmps85.exe (for version 8.5) from our support site at: