Hi,
I have a problem about setdatasource to subreport.
My ASP set datasourec to mainreport and subreport.
But the report can't not display,always show 'Error Occurred Reading Records'.
I'm sure ADO object have data.But It still can't work.
I attach my ASP source code.My crystal report version is XI DEVELOPER.
Please help me to solve the question.
<!-- #INCLUDE FILE="send_rpt_lib.asp" -->
<%
reportname = str_rptname
%>
<!-- #include file="AlwaysRequiredSteps.asp" -->
<%
On error resume next
Session("oRpt").DiscardSavedData
Set tables= Session("oRpt").Database.Tables.item(1)
tables.SetDataSource rs_sendrpt, 3
Set subReportOne = session("oRpt").OpenSubReport("Subreport2")
subReportOne.DiscardSavedData
Set subReportOneTables = subReportOne.Database.Tables.item(1)
subReportOneTables.SetDataSource rs_sendrpt1,3
Set rs_sendrpt=nothing
set rs_sendrpt1=nothing
%>
<%
'==================================================================
'
' MORE ALWAYS REQUIRED STEPS
'
' Include the file MoreRequiredSteps.asp which contains the code
' for the steps:
' - retreive the records
' - create the page engine
' - create the smart viewer and point it to rptserver.asp
'
'==================================================================
%>
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartViewerActiveX.asp" -->