Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameters from ASP (Not ASP.Net) to CR 8.5

Status
Not open for further replies.
Oct 11, 2006
300
US
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" -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top