ShowReport Script Examples

From QPR ProcessAnalyzer Wiki
Revision as of 09:07, 20 June 2016 by TeeHiet (talk | contribs) (403051)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page contains script examples for the ShowReport script command.

The following example opens the data table identified by data table name "SqlTable" and project name "Test" as a report.

(SELECT 'AnalysisType', '18') UNION ALL
(SELECT 'ProjectName', 'Test') UNION ALL
(SELECT 'DataTableName', 'SqlTable') UNION ALL
(SELECT 'TargetTable', '#AnalysisResult')
--#GetAnalysis

SELECT * FROM #AnalysisResult; 
(SELECT 'Title', 'Report1') UNION ALL
(SELECT 'SheetName', 'Sheet1') UNION ALL
(SELECT 'MaximumCount', '0') 
--#ShowReport 

The following script will create contents to a temporary table, and then show a pivot table from those contents.

(SELECT 'AnalysisType', '5') UNION ALL
(SELECT 'SelectedCaseAttributes', '*') UNION ALL
(SELECT 'FilterId', CAST(@_FilterId AS NVARCHAR)) UNION ALL
(SELECT 'TargetTable', '#AnalysisResult')
--#GetAnalysis

(SELECT * FROM [#AnalysisResult])
(SELECT 'Title', 'Report1') UNION ALL
(SELECT 'SheetName', 'ShowReportResult') UNION ALL
(SELECT 'PivotSheetName', 'Pivot') UNION ALL
(SELECT 'PivotTitle', 'Pivot report name') UNION ALL
(SELECT 'PivotRows', 'Account Manager') UNION ALL
(SELECT 'PivotColumns', 'Region') UNION ALL
(SELECT 'PivotValues', 'Duration Days')
--#ShowReport