Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to use Crystal reports 9 to add report with sub report on vb 6 code. This will print without previewing.

VB
Dim RptRec As New CryMainReport

RptRec.Database.SetDataSource sqlMainReportRec
RptRec.Subreport1.OpenSubreport.Database.SetDataSource sqlSubReportRec
RptRec.ReadRecords    
RptRec.PrintOut False


But in the printout it's not showing the data for the sub report. I placed this sub report in the main report's footer section. and sub report is an existing report of the project.

What I have tried:

VB
Dim RptRec As New CryMainReport

RptRec.Database.SetDataSource sqlMainReportRec
RptRec.Subreport1.OpenSubreport.Database.SetDataSource sqlSubReportRec
RptRec.ReadRecords    
RptRec.PrintOut False
Posted
Updated 7-Feb-16 2:47am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900