i use vb with Access. I have 2 tables table1 & table2

i create a data report showing the data from table1. My aim is to display the data from table2 on the same report in its next page(s). any kind of help, suggestions will be highly appreciated.

with regards

bashir ahmad

Dani AI

Generated

— since the two tables are unrelated, the most reliable approach is to build a single container report that hosts two independent subreports (one bound to each table). 's query suggestion is ideal when you can combine data into one recordset (union/join), but when the schemas differ a subreport approach keeps the data separate while printing in one output.

Practical steps in Access (works cleanly if you design reports in Access and then show/export them from VB): create two simple reports (one for table1, one for table2). Create a new blank report (no Record Source) to act as the main container. Insert two Subreport controls and set each control's Source Object to the corresponding report. Because the data sets are unrelated, leave Link Master Fields and Link Child Fields empty. To force the second subreport onto the next page, set the section that contains the first subreport to Force New Page = After Section (adjust Can Grow/Can Shrink as needed). Preview and tweak margins/headers so page breaks look right.

If you are using VB.NET or a different reporting engine, the same idea applies: use a main report with subreports or add multiple datasets and render each dataset in its own region. If your current reporting tool has no subreport support, alternatives are printing the two reports sequentially (or exporting both to PDF and merging), or switching to a reporting engine (RDLC/ReportViewer or Crystal Reports) that supports multiple independent data sources. Test page numbering and headers after combining; subreports sometimes reset page numbers or headers and need small adjustments.

Recommended Answers

All 3 Replies

the question has been posted under vb head. so discard it from here

Set up a query, then in your report set the data to the query not the table.

thanks for the reply. actually the two tables are quit different in nature so can not be combined with a query. say table1 consists of employees and table2 of students. the two reports on the tables can be prepared easily but i want to have bothe the tables on the pages of the same report.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.