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:

  1. Select Module > System > Configuration File Maintenance.
    The Configuration File Maintenance window is displayed.
  2. 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.
  3. Select the configuration setting.
  4. Click.
    The Edit Config Value window is displayed.
  5. Find where you want the report to be embedded.
  6. Type {Report}{/Report}.
  7. 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.
Note: This field is mandatory.

ReportName=attstu

AnchorText

Text to appear for the hyperlink of the report.
Note: You must specify either AnchorText or an AnchorImage.

AnchorText=Attendances Report For {StudentGiven}

AnchorImage

Image to appear for the hyperlink of the report.
Note: You must specify either AnchorText or an AnchorImage.

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.
Note: This field is mandatory.

RecordSelectionFormula={vAttendancesWithAbsences.ID} = [PortalStudentID] AND {vAttendancesWithAbsences.FileYear} = [PortalFileYear]

OverwriteRecordSelectionFormulaFlag

Flag to override the selection formula already in the report.
Defaults to False (0) unless specified.

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:

  • _blank - open the document in a new window
  • _parent - open the document in the parent frameset
  • _self - open the document in the same frame that it was clicked
  • _top - open the document in the full body of the current window.
    Defaults to _blank unless specified.

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.