ReportingAnalyst
MIS
Hi,
This is what I do to pass log on info to the Crystal Reports.
<%
'------------------------------------------------------------------
' Working with SetLogOnInfo
'------------------------------------------------------------------
' The datasource here is called "DSNName". It is a System
' Datasource, and points to the "DBName" database, which is installed
' with SQL Server.
userid = "user"
password = "pwdpt"
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
' Set the location
set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo "DSNName", "DBName", cstr(userid), cstr(password)
%>
But this report has 17 sub-reports. All these reports also refer to the same database with same username and password. How can I pass the same logon info to each and every sub-reports?
Whatever parameter I am passing to the main report also works for the 17 sub-reports.
Please assist me here.
This is what I do to pass log on info to the Crystal Reports.
<%
'------------------------------------------------------------------
' Working with SetLogOnInfo
'------------------------------------------------------------------
' The datasource here is called "DSNName". It is a System
' Datasource, and points to the "DBName" database, which is installed
' with SQL Server.
userid = "user"
password = "pwdpt"
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
' Set the location
set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo "DSNName", "DBName", cstr(userid), cstr(password)
%>
But this report has 17 sub-reports. All these reports also refer to the same database with same username and password. How can I pass the same logon info to each and every sub-reports?
Whatever parameter I am passing to the main report also works for the 17 sub-reports.
Please assist me here.