Hello,
I am getting error in ObjRpt.ReadRecords. The Error Message is "Physical Database not found". I am using Access Database for trial purpose. Please help me.
This is the code I am using
Dim strSystemPath
Dim strReportFile
Dim strConnectionString
Dim rsTemp
Dim strSql
Dim objApp
Dim objRpt
strSystemPath=Request.ServerVariables("PATH_TRANSLATED"
strSystemPath=Mid(strSystemPath,1,InStrRev(strSystemPath,"\"
)
strConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strSystemPath & "BIBLIO.MDB;Persist Security Info=False"
strReportFile=strSystemPath & "Reports\Report2.rpt"
strSql="Select * from Authors"
Set rsTemp=Server.CreateObject("ADODB.Recordset"
rsTemp.Open strSql,strConnectionString
Response.Write(rstemp.fields(2))
If rsTemp.EOF and rsTemp.BOF then
Response.Write "No Data Found"
Response.End
End If
Set objApp = Server.CreateObject("CrystalRuntime.Application"
Set objRpt = objApp.OpenReport(strReportFile, 1)
objRpt.MorePrintEngineErrorMessages = False
objRpt.EnableParameterPrompting = False
objRpt.DiscardSavedData
objRpt.Database.SetDataSource rsTemp
objRpt.ReadRecords
Set session("oApp"
= objApp
Set session("oRpt"
= objRpt
If IsObject(session("oPageEngine"
) Then
Set session("oPageEngine"
= nothing
End If
Set session("oPageEngine"
= session("oRpt"
.PageEngine
Set rsTemp=nothing
Viewer = "ActiveX"
If cstr(viewer) = "ActiveX" then
%>
<!-- #include file="SmartViewerActiveX.asp" -->
<%
ElseIf cstr(viewer) = "HTML Frame" then
' Response.Redirect("htmstart.asp"
Else
' Response.Redirect("rptserver.asp"
End If
%>
Regards
I am getting error in ObjRpt.ReadRecords. The Error Message is "Physical Database not found". I am using Access Database for trial purpose. Please help me.
This is the code I am using
Dim strSystemPath
Dim strReportFile
Dim strConnectionString
Dim rsTemp
Dim strSql
Dim objApp
Dim objRpt
strSystemPath=Request.ServerVariables("PATH_TRANSLATED"
strSystemPath=Mid(strSystemPath,1,InStrRev(strSystemPath,"\"
strConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strSystemPath & "BIBLIO.MDB;Persist Security Info=False"
strReportFile=strSystemPath & "Reports\Report2.rpt"
strSql="Select * from Authors"
Set rsTemp=Server.CreateObject("ADODB.Recordset"
rsTemp.Open strSql,strConnectionString
Response.Write(rstemp.fields(2))
If rsTemp.EOF and rsTemp.BOF then
Response.Write "No Data Found"
Response.End
End If
Set objApp = Server.CreateObject("CrystalRuntime.Application"
Set objRpt = objApp.OpenReport(strReportFile, 1)
objRpt.MorePrintEngineErrorMessages = False
objRpt.EnableParameterPrompting = False
objRpt.DiscardSavedData
objRpt.Database.SetDataSource rsTemp
objRpt.ReadRecords
Set session("oApp"
Set session("oRpt"
If IsObject(session("oPageEngine"
Set session("oPageEngine"
End If
Set session("oPageEngine"
Set rsTemp=nothing
Viewer = "ActiveX"
If cstr(viewer) = "ActiveX" then
%>
<!-- #include file="SmartViewerActiveX.asp" -->
<%
ElseIf cstr(viewer) = "HTML Frame" then
' Response.Redirect("htmstart.asp"
Else
' Response.Redirect("rptserver.asp"
End If
%>
Regards