Retrieving Summary Information
Every report has a variety of summary information saved with it. This information is set by the report designer and it usually consists of things such as the report author, the report title and report comments. This information is set during design mode by right-clicking on the report and selecting Report | Summary Info. The class that maintains this summary information is the SummaryInfo class. Although you can override the property values, more than likely, you will only want to read from these values. This information was set by the report designer and won’t need to change during runtime. There are only a half dozen properties that this class exposes (see Table 14-1).
Table 14-1. Properties of the SummaryInfo class.
Property | Description |
---|---|
KeywordsInReport | The keywords in the report. |
ReportAuthor | The author of the report. |
ReportComments | Comments about the report. |
ReportSubject | The subject of the report. |
ReportTitle | The title of the report. |
The following example displays a message box showing the author of a report. You can see that accessing these properties is very simple. CrystalReport1 is the class for a generic report. Replace it with the class name of your own report.
Dim MyReport As New CrystalReport1
MessageBox.Show(MyReport.SummaryInfo.ReportAuthor)