Crystal reports provide reports inside report feature which normally known as a subreport feature.
Let me explain it in details. Here also we will design only sub report design for rest of the thing refer part-1
Add new report to the solution. Then add ReportàGroup and select only Customer name because we want to design report for each customer and sub report product wise. So there will be only one group header inside the Customergroup header as per figure 26.
Figure 26
Now right click on Detail section and select InsertàSubreport refer figure 27
Figure 27
Once we add subreport it will show screen like figure 28
Figure 28
As per figure 28 by default choose a Crystal Report in project is selected if you want to add report from the project then otherwise select create a subreport with the report wizard. Once we select create a subreport with Report Wizard (3rd radio button) we have to click on the Report Wizard button to select report type and data source just do as Part - 1 first. Then click on ok button so like chart report it will show a moving rectangle around mouse , click on the detail section where you want to show subreport.
Now to edit the sub report refer figure 29
Figure 29
Click on the edit subreport option and format the report as per your need here I will suggest add product name and product quantity or you can add chart also for sub report. When you click on the subreport button it will open subreport designer, actually CR will create a separate .rpt file but it will be remain hidden inside the main .rpt file so we can’t see it.
Now run the report and you can see the result, Report inside report like figure 30
Figure 30
Here no 1 is the main report and no 2 is subreport it’s showing title as Product wise.





No comments:
Post a Comment