Embedding Crystal Reports in CustomHTML
You can embed a Crystal Report inside any header or footer of the portal through the CustomHTML fields.
To embed a Crystal Report:
- Select Module > System > Configuration File Maintenance.
The Configuration File Maintenance window is displayed. - Find the CustomHTML configuration setting for the tab you want to embed the report in.
For example, if you want to embed the report in the Docs tab, find the CommunityPortal:CustomHTML:Docs:Top configuration setting. - Select the configuration setting.
- Click.
The Edit Config Value window is displayed. - Find where you want the report to be embedded.
- Type {Report}{/Report}.
- Between the {Report} tags, type the Report Criteria fields separated by a comma, without spaces. For example:
{Report}ReportName=attstu,AnchorText=Attendances Report for {StudentGiven},RecordSelectionFormula={vAttendancesWithAbsences.ID} = [PortalStudentID] AND {vAttendancesWithAbsences.FileYear} = [PortalFileYear],WindowCaption=Attendance Report new window{/Report}
Report Criteria fields
Name | Description | Example |
---|---|---|
ReportName | Name of the report to embed. | ReportName=attstu |
AnchorText | Text to appear for the hyperlink of the report. | AnchorText=Attendances Report For {StudentGiven} |
AnchorImage | Image to appear for the hyperlink of the report. | AnchorImage=/images/reportIcon.gif |
RecordSelectionFormula | The selection formula for the Crystal Report, including which database views are required, and the appropriate replaceable parameter key for each. See Replaceable parameters below. | RecordSelectionFormula={vAttendancesWithAbsences.ID} = [PortalStudentID] AND {vAttendancesWithAbsences.FileYear} = [PortalFileYear] |
OverwriteRecordSelectionFormulaFlag | Flag to override the selection formula already in the report. | OverwriteRecordSelectionFormulaFlag=1 |
WindowCaption | Caption of the tab to appear when the document is opened. | WindowCaption=Attendance Report new window |
WindowTarget | Where the report should appear if opened. Allowable values are:
| WindowTarget=_top |
Replaceable parameters
Replaceable parameters are used within square brackets [ ] to insert information into the report criteria such as the current year or the relevant student.
Parameter | Description |
PortalFileSemester | Current semester of the portal. |
PortalFileSemesterEndDate | End date of the current semester of the portal. |
PortalFileSemesterPublishDate | Portal publish date. |
PortalFileSemesterStartDate | Start date of the current semester of the portal. |
PortalFileYear | Current year of portal. |
PortalGetDate | Current date. |
PortalGetEndOfMonthDate | Date of the last day of the current month. |
PortalGetStartOfMonthDate | Date of the first day of the current month. |
PortalGetStartOfYearDate | Date of the start of the current year. |
PortalStudentCampus | Campus of the selected student. |
PortalStudentID | ID of the selected student. |
PortalUserID | ID of the user logged in. |