This article describes the Variables that can be used to display report data, or properties of reports.
For details on Variables that can be used when creating reports see Using Variables in the Report Builder.
- reportid is the system ID for the report (see Determining the reportid)
- property can be:
- recordcount - Count of the number of records within a specified report
- csvdata - Report data, with each field separated by commas
- exportdata - Report data, formatted as defined in the Advanced Export settings of the Report
- ReportProperty is case sensitive. Using reportproperty will not work.
- In order to use a ReportProperty on a report which has a group by clause, you need to add a distinct clause to the ReportProperty syntax.
@ReportProperty(''reportid'',''property'',distinct(''fieldname''))@ Example: If a report is grouped by the tracking id, then your ReportProperty syntax would be @ReportProperty(''reportid'',''property'',distinct(op.opportunityid))@
You can also pass criteria into the ReportProperty call. See Including Criteria in ReportProperty.
recordcount can be used:
- To generate the number of records (equivalent to the number of rows in the report) for report with ID 12345
- To display the number of records at a given status in a Portal Icon:
Will display as:
When using the Exportdata report variable, the variable will be replaced with data from the specified report, in the format defined by the advance export template.
Most often exportdata is used with report export settings defined as HTML.
When using the csvdata report variable, the variable will be replaced with data from the specified report, as comma separated values.
csvdata is most often used within the body of a plain-text workflow e-mail.
When using the csvdata variable the header and footer defined on the Report Export page will be used.
- When using any of the ReportProperty variables (recordcount, exportdata and csvdata) the object ID (opportunityid, eventid, userid, etc) will be passed to the report processor. If the specified report includes the variable: @objectid@, it will be replaced by the object ID of whichever object (Level 1, Level 2, Contact, etc) called the ReportProperty attribute.