ReportingAnalyst
MIS
Hi,
I have a simple ASP page where I want to pass parameters from ASP to CR 8.5.
'1. I request for form elements:
'Format the Period to a DateTime
strPeriod = formatdatetime(Request.Form("Period"), 0)
'Request for the Report to be viewed
strReport = Request.Form("crystalradio")
'Get the year from the period and attach it to the report
strReport1 = strReport & Year(strPeriod) & ".rpt"
'Get the EmpID from the form
strEmpID = Request.Form("empid")
'2.Now I want to pass these parameters (strPeriod, strEmpID) to CR 8.5.
'3. Call the report that needs to be opened.
reportname = strReport1
<!-- #include file="AlwaysRequiredSteps.asp" -->
'4. Give the SetLogOnInfo that is required for the report and subreports.
userid = "username"
password = "password"
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
' Set the location
set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo "DSNName", "DatabaseName", cstr(userid), cstr(password)
'5. Now pass the parameters where I want to equate strPeriod to {?Post Date} and strEmpID to {?EmpID}
'How do I do this part? Please help me here. I stuck because of this. I just need to pass the form variables some way so that report will show data based on these form variables.
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartVieweractivex.asp" -->
I have a simple ASP page where I want to pass parameters from ASP to CR 8.5.
'1. I request for form elements:
'Format the Period to a DateTime
strPeriod = formatdatetime(Request.Form("Period"), 0)
'Request for the Report to be viewed
strReport = Request.Form("crystalradio")
'Get the year from the period and attach it to the report
strReport1 = strReport & Year(strPeriod) & ".rpt"
'Get the EmpID from the form
strEmpID = Request.Form("empid")
'2.Now I want to pass these parameters (strPeriod, strEmpID) to CR 8.5.
'3. Call the report that needs to be opened.
reportname = strReport1
<!-- #include file="AlwaysRequiredSteps.asp" -->
'4. Give the SetLogOnInfo that is required for the report and subreports.
userid = "username"
password = "password"
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
' Set the location
set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo "DSNName", "DatabaseName", cstr(userid), cstr(password)
'5. Now pass the parameters where I want to equate strPeriod to {?Post Date} and strEmpID to {?EmpID}
'How do I do this part? Please help me here. I stuck because of this. I just need to pass the form variables some way so that report will show data based on these form variables.
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartVieweractivex.asp" -->