The report below is created using two subreports: one for gifts and one for notes. The constituents' names and the lines underneath are part of the main report. The gift information is a subreport containing all the gifts and total giving for each constituent. The notes information is a separate subreport. Subreport allows each section to be as long as necessary without interfering with other report data.
Compare the report using subreports, above, with this report below that does not use the subreports feature.
Follow the steps below to create this report using subreports.
- Create the data file in RE:Export. If you do not want to include all constituent records in the export, create a constituent query in RE:Query before creating the export. Select Single Set of Parameters when you select your first gift field. Remember to export in MS Access Report Writer Database format.
Note: The following fields were used in this sample report: Constituent Name, Constituent Sort Key, Gift Amount, Gift Date, Gift Type, Gift Fund Description, Gift Campaign Description, Gift Appeal Description, Notepad Type, Notepad Notes, and Notepad Date.
- In Crystal Reports, click New Report, Custom, Data File. Browse for the name and location of the .mdb file you just created and click OK. On the Select Tables screen, click Select All and then click OK. On the Visual Linking Expert screen, click Smart Linking and then click OK.
- Place the CnBio_Name field in the Page Header.
- Place the Sort Key field in the Details section. Select Report, Sort Records from the menu bar and select to sort by Sort Key. Click OK and then delete the Sort Key field from the Details section. This alphabetizes the names on your report.
- Select Insert, Subreport from the menu bar. In the Report Name field, type Gifts. Click Report Expert.
- On the Data tab, click Data File and select the export file you created in Step 1. On the Select Tables screen, click Select All. Click OK and then click Done.
- On the Create Report Export screen, click Next.
- Select the gift fields you want to include in the gift subreport (Date, Gift Type, Amount, Campaigns, Funds, and Appeals). Click OK.
- Click the Links tab. In the Containing Report box, select the Database Field, CnBio.CnBio_IDKEY, and click Add. CnBio_IDKEY will be the Linking field. Click OK.
- Place the subreport in the Details section directly under CnBio_Name.
- Once you have placed the subreport on the page, resize the field to your liking. Note the size, in inches, of this subreport field.
- To edit the subreport, right-click on the Gifts subreport field and select Edit Subreport. This will allow you to arrange the gift fields in the subreport. Ensure that all fields in your subreport fit inside the subreport field size you noted in Step 11. Move from tab to tab to arrange the fields.
- While editing the subreport, hide the report header and footer. Once the report is finished you can go back to the main report by clicking the Design tab.
- Follow the same steps (5 - 13) to create and insert the Notes subreport. When you reach Step 8, include only the Notes fields in the Notes subreport.
The Design tab of the report will now look like this:
After completing the basic structure of the report, follow these formatting steps:
- To ensure that only one constituent will print per page, click the Design tab, right-click on the Details gray section, and select Format Section. Mark the New Page After and Keep Together checkboxes.
- To insert the total number of gifts for each constituent, edit the Gifts subreport. Select Insert, Group from the menu bar and sort by Sort Key. Mark the Keep Group Together checkbox. Right-click on the Amount field and select Insert Subtotal. Select Insert, Text Object from the menu bar and place it in the group footer. Type the text such as Total Giving for and then insert the CnBio_Name field in the text box and drag the Sum of Amount field in the text box. The text box will look like this: Total Giving for [CnBio_Name]: [Sum of Amount]
- To add the column titles, such as Date and Amount, edit the Gifts subreport. In the group header you created in Step 2, insert a text box for each column title.
- To arrange the gifts in date order on the report, edit the Gifts subreport. Select Insert, Group from the menu bar and sort by Gift Date. Hide both the group header and group footer.
- To align the fields on the report, click the Design tab and right-click on the Details gray section. Select Fit Section.
- To remove the border lines from around the subreports, click the Design tab and right-click on the subreport. Select Change Border. Select None in each of the Line Style selection boxes and click OK.