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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass uid/pwd from ASP to Crystal subreport???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I can pass username/password to main report,but I also user
SQL Server tables in subreports,every time I run report it
will prompt me for the username/password for the subreports,
how to aviod that?

Thx !!!
 
Here's how I do it:

Set CRSubreports = oRpt.OpenSubreport("subrept.rpt")
set ReportDatabase2 = CRSubreports.Database
Set crdatabasetables2 = ReportDatabase2.tables
set crtable2 = crdatabasetables2.Item(1)
crtable2.SetLogonInfo Application("CRServerName"), Application("CRDBName"), Application("CRLogonID"), Application("CRPassword")
set ParamsSub = CRSubreports.ParameterFields

ParamsSub.Item(1).SetCurrentValue str1, 12
'item 2 is not passed via parameter. It's passed through Crstal Reports
ParamsSub.Item(3).SetCurrentValue str3, 12
ParamsSub.Item(4).SetCurrentValue str4, 12

oRpt.ReadRecords
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top