Click here to Skip to main content
15,922,533 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
PK_MainPid MainProductName MainProductPrice
101 HP Laptop 36000
102 DELL Laptop 42000
103 SONY Laptop 45000

PK_SubPid FK_MainPid SubProductName SubProductPrice
01 101 DVD DRIVE 12000
02 101 USB Mouse 12000
03 101 Hard Disk 12000
04 102 DVD DRIVE 15000
05 102 USB Mouse 15000
06 102 Hard Disk 12000
07 103 DVD DRIVE 15000
08 103 USB Mouse 15000
09 103 Hard Disk 15000

Here I have two tables Main Product and SubProduct and I want to make report and I want output like this format means same column MainProduct (HP Laptop) and below this I want to display all sub product like(DVD DRIVE,USB Mouse,HardDisk)

HP Laptop 36000
USB Mouse 12000
Hard Disk 12000
DELL Laptop 42000
USB Mouse 15000
Hard Disk 12000
SONY Laptop 45000
USB Mouse 15000
Hard Disk 15000

is it possible and how

Help me

1 solution

You ask for a report here posting the table structure. :doh:

It does not work like this here. I am sorry but there is no quick question here. This sounds like your college project/assignment, you should put some effort.

We expect you to put some time in trying the issue that you are facing and then some time in formulating the question while posting here.

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.

To start with, make a query that returns all the data. It would be a simple inner join query. Use that query as input to the report.
Share this answer
Pong D. Panda 3-May-11 1:15am    

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