Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ado recordset has data, not showing up in report

Status
Not open for further replies.

earme

Programmer
Jul 27, 2000
155
US
Hello,

My report and subreport have a bit of a problem. First, some info, I'm using VB 6 and working with the reportviewer for crystal 8.5.
My report will show the information, if I step through the .veiwreport and .show code, otherwise, nothing, no data, nada. So that's problem one. Problem 2 is the subreport won't show data at all, for some unknown reason. I know that both recordsets (the recordset for the main report and the recordset for the subreport) do have data in them, I can access it when stepping through the code.

Any suggestions? Would this be better posted elsewhere?

Thanks!
Earme
 
Are you using the Active Data connection for the report and subreport? What is the coding you are using from VB?

Aaron
 
I am using an ADO connection for both.
The code is:
Code:
' Set the data source
Call frmReportViewer.rptDir.Database.SetDataSource(recReportSet, 3)
    
Call frmReportViewer.rptDir.OpenSubreport(frmReportViewer.rptDir.Subreport1.SubreportName).Database.SetDataSource(recSubReportSet, 3)
With frmReportViewer
   .CRViewer1.ReportSource = .rptFutureDirMonthlyCluster
   ' Setup the report viewer
   .ViewReport
   ' Show the preview window
   .Show
End With

The only way I can view data in the main report is to step over the code in the with block. The subreport won't work at all.

Earme
 
Found the solution here in another thread(thread766-305537). Solution was to leave the recordset open at the end of the function, because the report wasn't finished using it before it was closed in the function.
Earme
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top