Add the required parameters to filter the datasets
Standard and custom log reports must include a hidden lead or project parameter to filter the dataset. The name of this parameter and the SQL syntax depends on whether the report is for a single lead, single project, or multi-project.
Parameters
| Type of log report | Parameter name | SQL syntax |
| Single lead | ProjectLeadId |
WHERE (ViewName.ProjectLeadId = @ProjectLeadId)
For example:
|
| Single project | ProjectId |
WHERE (ViewName.ProjectId = @ProjectId)
For example:
|
| Multi-project | ProjectIds |
WHERE (ViewName.ProjectId IN (@ProjectIds))
For example:
|
| Estimate log reports* | EstimateId |
WHERE (ViewName.EstimateId = @EstimateId)
For example:
|
* Log reports accessed from the estimate's Summary and Proposals tab must use EstimateId as the filter parameter, regardless of whether the estimate is associated with a lead or project.
Filter the dataset for a single project report
- With the custom report open, select the parameters icon (
) and select + New Parameter.
- Enter ProjectId in the Name and Prompt fields.
This parameter is also used in the standard log reports and is populated dynamically based on the account.
-
Select Integer from the Data Type dropdown.
-
Select Hidden from the Visibility dropdown.
-
Select Save.
- Select the database icon (
). - Hover over the main dataset and select the three dot menu icon (
). - Select Edit.
- Toggle the Code field to the right to view the SQL.
- Add the ProjectId parameter using the SQL WHERE clause at the bottom.
- Select Finish.
Filter the dataset for a multi-project report
- With the custom report open, select the parameters icon (
) and select + New Parameter.
- Enter ProjectIds in the Name and Prompt fields.
This parameter is also used in the standard log reports and is populated dynamically based on the account.
-
Select String from the Data Type dropdown.
-
Select Allow multiple values.
-
Select Hidden from the Visibility dropdown.
-
Select Save.
- Select the database icon (
). - Hover over the main dataset and select the three dot menu icon (
). - Select Edit.
- Toggle the Code field to the right to view the SQL.
- Add the ProjectIds parameter using the SQL WHERE clause at the bottom.
- Select Finish.