Add Custom Log Report - Step 2 - Add Required Paramater To Filter Dataset(s)

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 if the report is for a single lead, project or cross projects.

Parameter Names

Type of Log Report Parameter Name SQL Syntax
Single Lead ProjectLeadId WHERE (View Name.ProjectLeadId = @ProjectLeadId)
Examples:
WHERE (vw_LeadInfo.ProjectLeadId = @ProjectLeadId)
WHERE (vw_LeadInfoSimple.ProjectLeadId = @ProjectLeadId)
Single Project ProjectId WHERE (View Name.ProjectId = @ProjectId)
Examples:
WHERE (vw_ProjectInfo.ProjectId = @ProjectId)
WHERE (vw_ProjectInfoSimple.ProjectId = @ProjectId)
Cross Projects ProjectIds WHERE (View Name.ProjectId IN (@ProjectIds))
Examples:
WHERE (vw_ProjectInfo.ProjectId IN (@ProjectIds))
WHERE (vw_ProjectInfoSimple.ProjectId IN (@ProjectIds))
Estimate Log Reports * EstimateId WHERE (View Name.EstimateId = @EstimateId)
Example:
WHERE (vw_EstimateInfo.EstimateId = @EstimateId)

* Note: Log reports that will be accessed from the Estimate's Summary and Proposals tab must use EstimateId as the filter parameter. This is regardless of whether the Estimate is associated with a Lead or Project.


Single Project Parameter Example

  1. Click the 'Parameters' icon on the far right then click '+ New Parameter' at the bottom.



  2. Enter a hidden report parameter for ProjectId. This is the same parameter used in Corecon's Standard Log Reports and will be populated dynamically based on the account.



  3. Saved parameter.



  4. Click the 'Data' icon on the far right then click the three vertical dot button on the main dataset. See image below.



  5. Click Edit
  6. Toggle the Code field to the right to view the SQL code.



  7. Add the ProjectId parameter filter using the SQL WHERE clause as shown in the image below.



  8. Click Finish

Cross Project Parameter Example

  1. Click the 'Parameters' icon on the far right then click '+ New Parameter' at the bottom.



  2. Enter a hidden report parameter for ProjectIds. This is the same parameter used in Corecon's Cross Project Log Reports and will be populated dynamically based on the account.



  3. Saved parameter.



  4. Click the 'Data' icon on the far right then click the three vertical dot button on the main dataset. See image below.



  5. Click Edit
  6. Toggle the Code field to the right to view the SQL code.



  7. Add the ProjectIds parameter filter using the SQL WHERE clause as shown in the image below.



  8. Click Finish

Copyright © 2023 Corecon Technologies, Inc.