View: V_ShPaImPerProcessStep
This view shows the number of sheets, pages, and images in each process
step in the . It includes only documents whose history is saved.
Diagram:
This view is the data source for the Sheet
Page Image Per Process Step report.
|
DocCount | Number of documents in this process step.
|
SheetCount | Number of sheets in this process step.
|
PageCount | Number of pages in this process step.
|
ImageCount | Number of images in this process step.
|
Client | The name of the client (Client in V_StepsReports). |
Process | The name of the process (Process in V_StepsReports). |
ProcessStep | The name of the process step (ProcessStep
in V_StepsReports). |
UserName | The Windows user in whose name the client
process ran (UserName in V_StepsReports). |
DateOnly | Only the date (not the time) from the
DoneAt field (DateOnly in V_StepsReports). |
BatchID | The ID of the root document (BatchID
in V_StepsReports). |
SQL Script
CREATE VIEW [dbo].[V_ShPaImPerProcessStep]
AS
SELECT TOP (100) PERCENT COUNT(dbo.V_StepsReports.BatchID) AS DocCount,
SUM(CASE WHEN W_DocHistory.BatchID = W_DocHistory.DocumentID THEN SheetCount ELSE NULL END) AS SheetCount,
SUM(CASE WHEN W_DocHistory.BatchID = W_DocHistory.DocumentID THEN PageCount ELSE NULL END) AS PageCount,
SUM(CASE WHEN W_DocHistory.BatchID = W_DocHistory.DocumentID THEN ImageCount ELSE NULL END) AS ImageCount, dbo.V_StepsReports.Client,
dbo.V_StepsReports.Process, dbo.V_StepsReports.ProcessStep, dbo.V_StepsReports.UserName, dbo.V_StepsReports.DateOnly, dbo.W_DocHistory.BatchID
FROM dbo.W_DocHistory INNER JOIN dbo.V_StepsReports ON dbo.W_DocHistory.StepID = dbo.V_StepsReports.ID
GROUP BY dbo.V_StepsReports.Client, dbo.V_StepsReports.Process, dbo.V_StepsReports.ProcessStep,
dbo.V_StepsReports.UserName, dbo.V_StepsReports.DateOnly, dbo.W_DocHistory.BatchID
Uses
Related topics
The available tables
The available views