Crystal Reports Subreport Grouping
-
20-06-2021 - |
Question
This Question is regarding crystal reports sub-report grouping I have around 10 sub-reports each report is linked with One table(which is also sub report).
Table1
EMPID EmpName EmpSal EmpDesg
1 srik 12222 sssss
2 sri 22222 aaaaa
3 sss 3333 dddd
Table2
EMPID Accontno BankName Bal
1 234444 HDFC 12
2 5555555 ABC 1
3 333333 jjj 1
Table3
EMPID PrevOrg Loc EXp
1 ssss Bang 2
2 ABC Cal 3
3 BCD HYd 5
I have 7 more tables with foreign key EMPID. Each Table I have designed as sub-report.
Now I want to show my report in such a way that all EMPID 1 records at one place followed EMPID 2 records ....
Expected O/P:leave about headings
1 srik 12222 sssss(Table1)
1 234444 HDFC 12(Table2)
1 ssss Bang 2(Table3)
2 sri 22222 aaaaa (Table1)
2 5555555 ABC 1 (Table2)
2 BC Cal 3 (Table3)
3 sss 3333 dddd (Table1)
3 333333 jjj 1 (Table2)
3 BCD HYd 5 (Table3)
How to group the tables from different sub-reports in above format.
Thanks in advance.
Solution
- Add Table 1 to the main report.
- Delete the sub-report that contains Table 1 (you won't need it)
- Add the relevant fields from Table 1 to the Details section of the main report
- Add a Details section (insert section below) for each of the remaining sub-reports. Section Details A will contain the fields that you added in step 3. Details B..Details J will contain each of the remain sub-reports (one in each section)
- Link the EMPID in the main report to the EMPID in each of the subreports
- Insert a group in the main report on EMPID
OTHER TIPS
Thanks very much craig solution is working
Small info before closing thread To link sub report to main link follow the steps below:
Right click on Subreport select "Change Subreport Links" opens dialog from the Diaglog Move the common filed in my case "EMPID" from "Available fields" ->"Filed(s) To link To:
Dont change any thing else except this.