Create SubReport in Crystal Report
It's been while since I add a subreport in Crystal Report 10, so I better write some quick notes here to remind myself brief how to create a subreport:1. Create Store Proc to fill data into the corresponding table. In our system, a specific stored proc is being called when the report queue tries to generate that report. So I have to update that store proc to populate data into the proper table.
2. Open the Crystal Report document. Select [Insert][Subreport...] to open up a subreport dialog box.
3. Enter the subreport name and click [Next]
4. Select data source. In my case I select Oracle ADO driver.
5. Once you done with selecting driver, you can actually click [Finish] button. But you can also continue using the Wizard to select fields to be put on the screen. I used this feature so that the two field I want to list out was automatically added to the resultant subreport.
6. Once finished you need do one critical part: update the Field Linkage. In my case the input field of the report is the Queue_ID, so I need to join the Queue_ID Of the report and the report_queue_number field on the table.
After all these steps, the sub-report is basically done.
After the report was sub reported was created, I need to fine tune the following items:
- Adjust font size and font type.
- Remove borders on the subreport region. By default it gives me a single line border.
- Need to format the number values. By default the number was displayed as decimal.

0 Comments:
Post a Comment
<< Home