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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi tables details

Status
Not open for further replies.

sern

Programmer
Jan 8, 2003
31
MY
I wish to display data from 2 tables in the Details section.
The sequence will be:
1. Show all data from table 1 first.
2. After that show all data from table 2.

How can I do this??
 
You would have to use subreports to do this. Use one for one table, and one for the other table. If they relate to the same field, e.g., {table.customerID}, you might group on that in the main report and then link each subreport to that field. Place each subreport in a separate group header or footer section.

-LB
 
You only need one subreport, placed in report header or report footer. The other file can be shown in the main report.

The same applies if they are split by groups, use the group header or footer and pass the group value to the subreport.

Madawc Williams
East Anglia, Great Britain
 
I have tried to put data from one table in the main report. I created one subreport by using data from another table and insert into main report. But the result didn't show the subreport details. I used the following codes in my VB program:

Report.ReportFileName = App.Path & "\Main.rpt" 'Main report
Report.SetTablePrivateData 0, 3, rsMain 'Data from Table1
Report.SetTablePrivateData 1, 3, rsSub 'Data from Table2
Report.Action = 1


Is there any errors in the codes? Anyone pls help? Thanks.
 
I have tried the below codes but it also didn't show the complete subreport.

Report1.ReportFileName = App.Path & "\Main.rpt"
Report1.SetTablePrivateData 0, 3, rsMain
Report2.ReportFileName = App.Path & "\Sub.rpt"
Report2.SetTablePrivateData 0, 3, rsSub
Report1.Action = 1

Anyone please helps. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top