zwieback89
Programmer
I am pulling information from the Pubs database. I create an ASP page that shows the list of all the titles. These titles are pulled from the titles table.
The ASP page that opens the report title.rpt is as follows:
<%
reportname = "title.rpt"
<!--#include file=RequiredSteps.asp-->
'provide the server and the database values.
rptServer = "CVWeb"
rptDatabase = "ClinicalVision1"
rptUserid = "sa"
rptPassword = ""
' Set the location
set crtable = session("oRpt".Database.Tables.Item(1)
crtable.SetLogonInfo CStr(rptServer), CStr(rptDatabase), cstr(rptUserid), cstr(rptPassword)
'to test whether or not connection is made to the server
response.write crtable.testconnectivity
'Set the Title ID parameter
Set session("ParamCollection" = Session("oRpt".Parameterfields
Set Param1 = session("ParamCollection".Item(1)
Title = Request.Form("cmbTitle"
Response.Write title
Call Param1.SetCurrentValue (cstr(Title), 12)
session("oRpt".RecordSelectionFormula = "{titles.title_id} = {?TitleID}"
<!--#include file=MoreRequiredSteps.asp-->
<!--#include file=SmartViewerActiveX.asp-->
-------------------------------------------------
If I comment the code for the setting of location and mention the location in the CR, then I am able to pass my ASP variable to the CR and see the respective title ID in the CR.
Infact testConnectivity returns a value of true. and I am able to write the title ID to this ASP page. So both of them are fine.
But when I use the Setlogon method of providing the Database ServerName, Database Name, UserID and Password, and strip off the the database name, servername from the CR, then I get the following error:
Error detected by database DLL.
-2147192179
Seagate Crystal Reports ActiveX Designer
Does this connection works when we try to pass parameters to the CR from ASP pages ?
Hope to hear more on this. Please tell me what I could have done wrong. It is like I am so near, yet something is eluding me.
Regards, Padmaja.
The ASP page that opens the report title.rpt is as follows:
<%
reportname = "title.rpt"
<!--#include file=RequiredSteps.asp-->
'provide the server and the database values.
rptServer = "CVWeb"
rptDatabase = "ClinicalVision1"
rptUserid = "sa"
rptPassword = ""
' Set the location
set crtable = session("oRpt".Database.Tables.Item(1)
crtable.SetLogonInfo CStr(rptServer), CStr(rptDatabase), cstr(rptUserid), cstr(rptPassword)
'to test whether or not connection is made to the server
response.write crtable.testconnectivity
'Set the Title ID parameter
Set session("ParamCollection" = Session("oRpt".Parameterfields
Set Param1 = session("ParamCollection".Item(1)
Title = Request.Form("cmbTitle"
Response.Write title
Call Param1.SetCurrentValue (cstr(Title), 12)
session("oRpt".RecordSelectionFormula = "{titles.title_id} = {?TitleID}"
<!--#include file=MoreRequiredSteps.asp-->
<!--#include file=SmartViewerActiveX.asp-->
-------------------------------------------------
If I comment the code for the setting of location and mention the location in the CR, then I am able to pass my ASP variable to the CR and see the respective title ID in the CR.
Infact testConnectivity returns a value of true. and I am able to write the title ID to this ASP page. So both of them are fine.
But when I use the Setlogon method of providing the Database ServerName, Database Name, UserID and Password, and strip off the the database name, servername from the CR, then I get the following error:
Error detected by database DLL.
-2147192179
Seagate Crystal Reports ActiveX Designer
Does this connection works when we try to pass parameters to the CR from ASP pages ?
Hope to hear more on this. Please tell me what I could have done wrong. It is like I am so near, yet something is eluding me.
Regards, Padmaja.