Changes

Jump to: navigation, search

Report Variables

925 bytes added, 14:17, 27 May 2016
no edit summary
This article describes the [[Variables]] that can be used to display [[Reports]]report data, or properties of reports.
'''For details on [[Variables]] that can be used when creating reports see [[Using Variables in the Report Builder]].'''
'''==Syntax:'''==
:<font size=3>@ReportProperty(''reportid'',''property'')@</font>
:* '''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 [[Exporting Reports|Advanced Custom Export]] settings of the Report :* '''exportrawdata''' - Report data, without any formatting
 
'''Note:'''
:* ''ReportProperty'' is case sensitive. Using ''reportproperty'' will not work.
 
===Using ReportProperty on reports with a Group By===
:* 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(opportunityid))@
 
 
You can also pass '''criteria''' into the ReportProperty call. See [[Including Criteria in ReportProperty]].
==Record Count==
'''Important: ''' The ''recordcount'' property does not work if your [[Report]] includes '''Group By'''. It can only be used to count the records in a report based on filtered criteria.
==CSV Data==
When using the '''csvdata''' report variable, the variable will be replaced with data from the specified report, as comma separated values.
:<font size=3>@ReportProperty(''reportid'',csvdata)@</font>
 
 
''The csvdata variable can be used in a [[Web Page View]] or [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] custom field, or be included in the body of a [[Workflow]] message.''
 
'''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.
==Export Data==
* '''Exportdata''': when When using the Exportdata report variable, the variable will be replaced with data from the specified report, in the format defined by the advance custom export template.
:<font size=3>@ReportProperty(''reportid'',exportdata)@</font>
Most often '''exportdata''' is used with report export settings defined as HTML.
'''Example''': To display the exported report for the report with ID 12345
@ReportProperty(12345,exportdata)@
 ==CSV Export Raw Data==* '''Csvdata''': when When using the Csvdata Exportrawdata report variable, the variable will be replaced with data from the specified report, as comma separated valueswithout any formatting applied.:<font size=3>@ReportProperty(''reportid'',csvdataexportrawdata)@</font>
''The csvdata exportrawdata variable can be used in a [[Web Page View]] or [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] custom field, or be included in the body of a [[Workflow]] message.''
==Notes==
* 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.
'''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.
 
 
==Notes==
* 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.
==See Also==
* [[Including Criteria in ReportProperty]]
* [[Using Variables in the Report Builder]]
[[Category:Variables]][[Category:Reports]]
0
edits

Navigation menu