Report with Multiple Query (1 Viewer)

mfaisal.ce

Member
Local time
Today, 15:54
Joined
Dec 21, 2020
Messages
75
Hello Friends,

I need to make a report based on 2 or more queries/Forms/Tables......

First Page of report will show First Query till all records will end. then, next page will start Second query.......

Kindly guide...
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:54
Joined
Oct 29, 2018
Messages
16,078
Hi. Maybe use an unbound report with a subreport for each data source. Just a thought...
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:54
Joined
Feb 19, 2002
Messages
32,787
Put a pagebreak control between the two subreports to force the second one onto a new page.
 

mfaisal.ce

Member
Local time
Today, 15:54
Joined
Dec 21, 2020
Messages
75
Actually,

I have 3 Tables
1.Sales (Master Table)
2.Sales_detail
3.Sales_ Return

what i need is to get whole data of Master Sales Record from Child Tables on Single Report without repeating records.....

kindly guide....
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:54
Joined
Feb 19, 2002
Messages
32,787
Bind the main report to a query of Sales

Create a query that uses a left join of sales-detail to sales_return. Create a subreport that shows sales with any associated returns.

BTW, rather than keeping returns in a separate table, you should probably have an indicator on the sales_detail record to indicate a return.

You are probably getting "duplicates" because you have joined these tables incorrectly. If you want to do a single report (not recommended but possible), the join needs to be sales = detail > returns

= means inner join
> means left join

Or, you can make a main report with two subreports, one for sales and one for returns but to me it makes more sense to have the returns indicated at the detail they refer to.
 

Users who are viewing this thread

Top Bottom