You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LEFT JOIN (SELECT ExecutionLogCount = COUNT([ReportID]), ReportID FROM dbo.ExecutionLog GROUP BY ReportID) el ON el.ReportID = rpt.ItemID
138
-
LEFT JOIN (SELECT SubscriptionCount = COUNT([Report_OID]), Report_OID FROM dbo.Subscriptions GROUP BY Report_OID) sc ON sc.Report_OID = rpt.ItemID
139
-
LEFT JOIN report_users AS urc ON rpt.CreatedById = urc.UserID
140
-
LEFT JOIN report_users AS urm ON rpt.ModifiedById = urm.UserID
137
+
LEFT JOIN (SELECT [ExecutionLogCount] = COUNT([ReportID]), [ReportID] FROM dbo.[ExecutionLog] GROUP BY [ReportID]) el ON el.[ReportID] = rpt.[ItemID]
138
+
LEFT JOIN (SELECT [SubscriptionCount] = COUNT([Report_OID]), [Report_OID] FROM dbo.[Subscriptions] GROUP BY [Report_OID]) sc ON sc.[Report_OID] = rpt.[ItemID]
139
+
LEFT JOIN report_users AS urc ON rpt.[CreatedById] = urc.[UserID]
140
+
LEFT JOIN report_users AS urm ON rpt.[ModifiedById] = urm.[UserID]
141
141
WHERE
142
142
1=1
143
-
AND (@all_value IN (@ReportFolder) OR rpt.ReportFolder IN(@ReportFolder))
144
-
AND (@CreatedBy IS NULL OR urc.SimpleUserName LIKE '%' + @CreatedBy + '%')
145
-
AND (@CreatedDate IS NULL OR rpt.CreationDate >= @CreatedDate)
146
-
AND (@ModifiedBy IS NULL OR urm.SimpleUserName LIKE '%' + @ModifiedBy + '%')
147
-
AND (@ModifiedDate IS NULL OR rpt.ModifiedDate >= @ModifiedDate)
143
+
AND (@all_value IN (@ReportFolder) OR rpt.[ReportFolder] IN(@ReportFolder))
144
+
AND (@CreatedBy IS NULL OR urc.[SimpleUserName] LIKE '%' + @CreatedBy + '%')
145
+
AND (@CreatedDate IS NULL OR rpt.[CreationDate]>= @CreatedDate)
146
+
AND (@ModifiedBy IS NULL OR urm.[SimpleUserName] LIKE '%' + @ModifiedBy + '%')
147
+
AND (@ModifiedDate IS NULL OR rpt.[ModifiedDate]>= @ModifiedDate)
148
148
AND (
149
149
@SearchFor IS NULL
150
150
OR (
151
151
(rpt.[Name] LIKE '%' + @SearchFor + '%' AND (@all_value IN(@SearchType) OR 'Report Name' IN(@SearchType)))
152
152
OR (rpt.[Description] LIKE '%' + @SearchFor + '%' AND (@all_value IN(@SearchType) OR 'Report Description' IN(@SearchType)) )
153
-
OR (PATINDEX('%' + @SearchFor + '%', rpt.ReportDefinition) > 0 AND (@all_value IN(@SearchType) OR 'Report Definition' IN(@SearchType)) )
153
+
OR (PATINDEX('%' + @SearchFor + '%', rpt.[ReportDefinition]) > 0 AND (@all_value IN(@SearchType) OR 'Report Definition' IN(@SearchType)) )
0 commit comments