Difference between revisions of "Including Criteria in ReportProperty"

From SmartWiki
Jump to: navigation, search
Line 14: Line 14:
 
* ''criteria'' is the answer to the ??? in the report referenced by the reportid
 
* ''criteria'' is the answer to the ??? in the report referenced by the reportid
  
 
+
'''Example''':  
 
 
'''Examples''':  
 
 
* The report with reportid 12345 has a [[Prompting for Criteria in Reports|criteria]] on a date field of "=???"
 
* The report with reportid 12345 has a [[Prompting for Criteria in Reports|criteria]] on a date field of "=???"
 
* To generate the number of records in the report with a date of 2009-10-26:
 
* To generate the number of records in the report with a date of 2009-10-26:
Line 23: Line 21:
  
 
==Syntax for dynamic static parameters to a report==
 
==Syntax for dynamic static parameters to a report==
:<font size=3>@ReportProperty2(''reportid'',''property'',,"''criteria''")@</font>
+
:<font size=3>@ReportProperty2(''reportid'',''property'',,"''@criteria@''")@</font>
  
  
Line 32: Line 30:
 
:* '''csvdata''' - Report data, with each field separated by commas
 
:* '''csvdata''' - Report data, with each field separated by commas
 
:* '''exportdata'''- Report data, formatted as defined in the [[Exporting Reports|Advanced Export]] settings of the Report  
 
:* '''exportdata'''- Report data, formatted as defined in the [[Exporting Reports|Advanced Export]] settings of the Report  
* ''criteria'' is the  
+
* ''criteria'' is the variable that returns the answer to the ??? in the report referenced by the reportid
 +
 
 +
'''Example''':
 +
* The report with reportid 12345 has [[Prompting for Criteria in Reports|criteria]] on a date field of ">=???" and "<=???"
 +
* To generate the number of records in the report with a date range of startdate to enddate:
 +
@ReportProperty2(12345,exportdata,,"@year(fullstartdate)@-@month(fullstartdate)@-@day(fullstartdate)@"::"@fullenddate@")@
  
  
Line 43: Line 46:
  
 
==Notes==  
 
==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.
+
* Do not use single quotes to encapsulate criteria.
 +
* Note that if the ReportProperty variable is used on a web page view, the report will be run every time the web page view is opened. Therefore, use this functionality sparingly or server performance may be impacted.  
  
  

Revision as of 16:23, 10 August 2012

This article describes the syntax used with the ReportProperty variable in order to pass parameters to a report to be used as report criteria.


Syntax for passing static parameters to a report

@ReportProperty(reportid,property,,"criteria")@

Where:

  • 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
  • criteria is the answer to the ??? in the report referenced by the reportid

Example:

  • The report with reportid 12345 has a criteria on a date field of "=???"
  • To generate the number of records in the report with a date of 2009-10-26:
@ReportProperty(12345,recordcount,,"2009-10-26")@


Syntax for dynamic static parameters to a report

@ReportProperty2(reportid,property,,"@criteria@")@


Where:

  • 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
  • criteria is the variable that returns the answer to the ??? in the report referenced by the reportid

Example:

  • The report with reportid 12345 has criteria on a date field of ">=???" and "<=???"
  • To generate the number of records in the report with a date range of startdate to enddate:
@ReportProperty2(12345,exportdata,,"@year(fullstartdate)@-@month(fullstartdate)@-@day(fullstartdate)@"::"@fullenddate@")@


Syntax for passing multiple parameters to a report

@ReportProperty(12345,exportdata,,”criteria1”::”criteria2”)@

or

@ReportProperty2(reportid,property,,"criteria")@


Notes

  • Do not use single quotes to encapsulate criteria.
  • Note that if the ReportProperty variable is used on a web page view, the report will be run every time the web page view is opened. Therefore, use this functionality sparingly or server performance may be impacted.


See Also