Changes

Criteria Template

176 bytes added, 18:17, 8 December 2014
Variables
The Criteria Template section on the [[Report Template]] tab of the [[Creating a Basic Report|Edit Report Page]] defines the criteria section of a custom report template containing the prompt(s) for report [[parameter]](s) when [[criteria|report criteria]] are used.
<copylink> some text </copylink><copylink [text="string"]> some text </copylink>
When the Criteria Template is used, the report parameter prompt does not manifest as a pop-up when the report is run, but remains at the top of the page.
In the [[Creating a Basic Report|Edit Report Page]], we switch to the [[Report Template]] tab and enter the following in the ''Criteria Template'' section:<br />
 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><table> <tr> <th class=Sub> @arg1.label@ </th> <td> @arg1@ </td> </tr> <tr> <th class=Sub> @arg2.label@ </th> <td> <input type=text id=@arg2.id@ name=@arg2.id@ value="@me.firstname@"> </td> </tr> <tr> <td colspan=2 class=Submit> @submitbutton@ @exportbutton@ </td> </tr></table></pre><!--[[Image:CriteriaTemplate-SampleCriteriaTemplate.png|link=]]-->
Notice that the first criteria is left unchanged. The second criteria is where we create our own HTML input element and define it as the second criteria. The ''value'' is defaulted to the user's first name.<br />
* @fileexportbutton@
For reports containing multiple criteria, the variable syntax for the different criteria elements is arg''n'' where ''n'' is the order of the criteria defined in the [[Report Builder]]. * @arg1.label@ returns the text label of the input* @arg1@ returns the input field for the criteria* @arg1.id@ returns the element ID of the input{{MultipleCriteriaVariableSyntax}}
==Notes==
8,849
edits