Skip to content

Commit

Permalink
#210 adding a where clause to scoped configuration query to show data…
Browse files Browse the repository at this point in the history
… from shutdown only
  • Loading branch information
PiJoCoder committed Jan 31, 2023
1 parent c4f74b6 commit abaf5b9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
36 changes: 18 additions & 18 deletions NexusReports/DatabaseConfiguration_C.rdl
Original file line number Diff line number Diff line change
Expand Up @@ -448,24 +448,23 @@
<DataSet Name="DataSet_DatabaseScopedConfiguration">
<Query>
<DataSourceName>DataSource_SqlNexus_Private</DataSourceName>
<CommandText>IF OBJECT_ID('tbl_database_scoped_configurations') IS NOT NULL
BEGIN
DECLARE @sql VARCHAR (MAX)

<CommandText>IF OBJECT_ID('tbl_database_scoped_configurations') IS NOT NULL
BEGIN
DECLARE @sql VARCHAR(MAX)
IF COL_LENGTH('tbl_database_scoped_configurations', 'is_value_default') IS NULL
BEGIN
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, NULL AS is_value_default
FROM tbl_database_scoped_configurations
WHERE input_file_name like ''%Shutdown.out'''
END
ELSE
BEGIN
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, NULL AS is_value_default
FROM tbl_database_scoped_configurations'
END
ELSE
BEGIN
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, is_value_default
FROM tbl_database_scoped_configurations'
END

EXEC(@sql)
END
</CommandText>
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, is_value_default
FROM tbl_database_scoped_configurations
WHERE input_file_name like ''%Shutdown.out'''
END
EXEC (@sql)
END</CommandText>
</Query>
<Fields>
<Field Name="database_id">
Expand Down Expand Up @@ -1490,7 +1489,7 @@ END
<Top>0.79875in</Top>
<Left>0.68209in</Left>
<Height>0.5in</Height>
<Width>15.99999in</Width>
<Width>15.99998in</Width>
<ZIndex>3</ZIndex>
<Visibility>
<Hidden>true</Hidden>
Expand Down Expand Up @@ -1763,7 +1762,7 @@ END
<Top>2.79875in</Top>
<Left>0.68209in</Left>
<Height>0.5in</Height>
<Width>15.99999in</Width>
<Width>16in</Width>
<ZIndex>4</ZIndex>
<Visibility>
<Hidden>true</Hidden>
Expand Down Expand Up @@ -1867,6 +1866,7 @@ END
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down
36 changes: 18 additions & 18 deletions sqlnexus/Reports/DatabaseConfiguration_C.rdlC
Original file line number Diff line number Diff line change
Expand Up @@ -448,24 +448,23 @@
<DataSet Name="DataSet_DatabaseScopedConfiguration">
<Query>
<DataSourceName>DataSource_SqlNexus_Private</DataSourceName>
<CommandText>IF OBJECT_ID('tbl_database_scoped_configurations') IS NOT NULL
BEGIN
DECLARE @sql VARCHAR (MAX)

<CommandText>IF OBJECT_ID('tbl_database_scoped_configurations') IS NOT NULL
BEGIN
DECLARE @sql VARCHAR(MAX)
IF COL_LENGTH('tbl_database_scoped_configurations', 'is_value_default') IS NULL
BEGIN
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, NULL AS is_value_default
FROM tbl_database_scoped_configurations
WHERE input_file_name like ''%Shutdown.out'''
END
ELSE
BEGIN
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, NULL AS is_value_default
FROM tbl_database_scoped_configurations'
END
ELSE
BEGIN
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, is_value_default
FROM tbl_database_scoped_configurations'
END

EXEC(@sql)
END
</CommandText>
SET @sql = 'SELECT database_id, dbname, configuration_id, name, value, value_for_secondary, is_value_default
FROM tbl_database_scoped_configurations
WHERE input_file_name like ''%Shutdown.out'''
END
EXEC (@sql)
END</CommandText>
</Query>
<Fields>
<Field Name="database_id">
Expand Down Expand Up @@ -1490,7 +1489,7 @@ END
<Top>0.79875in</Top>
<Left>0.68209in</Left>
<Height>0.5in</Height>
<Width>15.99999in</Width>
<Width>15.99998in</Width>
<ZIndex>3</ZIndex>
<Visibility>
<Hidden>true</Hidden>
Expand Down Expand Up @@ -1763,7 +1762,7 @@ END
<Top>2.79875in</Top>
<Left>0.68209in</Left>
<Height>0.5in</Height>
<Width>15.99999in</Width>
<Width>16in</Width>
<ZIndex>4</ZIndex>
<Visibility>
<Hidden>true</Hidden>
Expand Down Expand Up @@ -1867,6 +1866,7 @@ END
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down

0 comments on commit abaf5b9

Please sign in to comment.