Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Supreport setdatasource problem


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


Set tables= Session("oRpt").Database.Tables.item(1)

tables.SetDataSource rs_sendrpt, 3

Set subReportOne = session("oRpt").OpenSubReport("Subreport2")


Set subReportOneTables = subReportOne.Database.Tables.item(1)

subReportOneTables.SetDataSource rs_sendrpt1,3

Set rs_sendrpt=nothing

set rs_sendrpt1=nothing







' 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" -->

Former Member

OK. I don't have much experience with RDC in ASP pages, but below is where I'd start. If anyone with ASP experience can pipe in - great.

1) Consider going to CR XI r2. As you have CR XI, you can get XI r2 from here:

My recommendation; before you go for the upgrade, make sure yo know your keycode as you will need it to install CR XI r2. Also, uninstall CR XI before installing r2 as the two do not like to play together. Finally, make sure you update the r2 install from here;

2) If you have to stay with CR XI, make sure you have the latest updates, you can find those [here|]

3) Make sure the report works from the designer (I realize you are using ADO at runtime, but in the designer, the report should be able to connect to a database?

4) Enable "Verify on 1st refresh" option.

5) Break up the problem into smaller parts. E.g.; remove the subreport. Does the report work without a subreport? Save out the subreport and run it on it's own. Does that work?


Follow us on Twitter

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question