Changes

Prompting for Criteria in Reports

1,358 bytes added, 18:35, 8 December 2014
Using the Same Criteria Multiple Times
2. Click the '''Edit''' button.
3. Click the '''[[Report Builder]]''' tab.
4. Click Open the Report Builder Help Panel and click on the [[SmartSimple]] '''[[Report Builder Column Settings|Special SmartSimple Criteria Values]]''' tab.
[[Image:Reps38ReportBuilderHelp-SSCriteriaValues.pngPNG|link=]]
There are three four special functions displayed.
:{| border="1" cellpadding="5"
|+
|@companyid@||Uses the current user's [[companyid]] as the criteria. This is useful when you need to create a generic report that displays all the records for the user running the report.
|+
|@objectid@||When using [[Report Variables|ReportProperty]], the object ID (opportunityid, eventid, userid, etc., depending on the [[entity]] being reported upon) will be passed to the report processor.
|}
 
 
[[Image:Reps34.png]]
* To allow the user to enter multiple values to be matched against the same field enter '''REGEXP ???''' in the Criteria of the report builder.
[[Image:Reps39.png]]
6. Click the '''Build Query''' {{BuildQueryButton}} button.
7. Click the '''Save''' {{SaveButton}} button.
8. Click the '''Preview''' {{PreviewButton}} button.
The '''Criteria Prompt''' window is displayed.
11. '''Close''' the current report.
 
==Using the Same Criteria Multiple Times==
You might want to build a report that uses the same criteria multiple times. For example, a report can prompt the user to enter a date value:
 
[[Image:ReportsPromptingForDate.png|link=]]<br />
When the report is run, the user will be prompted to select a date value:<br />
[[Image:ReportsPromptingForDatePrompt.png|link=]]<br />
But if the report should display all grants where the date specified is the ''Start Date'' OR the ''Approval Date'', the report would be configured as follows:<br />
[[Image:ReportsPromptingForTwoDates.png|link=]]<br />
This would result in two prompts unnecessarily being displayed to the user:<br />
[[Image:ReportsPromptingForTwoDatesPrompt.png|link=]]<br />
The solution is to use the ''@arg1@'' syntax. Entering ''=@arg1@'' as the second criteria will mean that the system will re-use the user-entered criteria for two comparisons:<br />
[[Image:ReportsPromptingForTwoDatesUsingArg1.png|link=]]
 
{{MultipleCriteriaVariableSyntax}}
==See Also==
* [[Passing Prompt Criteria to a Sub-Report]]
* [[Criteria Template]]
{{PrevNextStart}} [[Specifying Multiple Criteria in Reports]]
{{PrevNextMid}} [[Prompting for a Criteria using a Wildcard]]{{PrevNextEnd}}
[[Category:Reports]][[Category:Criteria]]
8,849
edits