Skip to content

Commit

Permalink
#338 fix instructions report links and add alternating colors function
Browse files Browse the repository at this point in the history
  • Loading branch information
PiJoCoder committed Jun 11, 2024
1 parent d5eabf0 commit 8310c9b
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 66 deletions.
52 changes: 28 additions & 24 deletions NexusReports/AlwaysOn_AGBasics_C.rdl
Original file line number Diff line number Diff line change
Expand Up @@ -613,16 +613,15 @@ FROM dbo.tbl_hadr_ag_states ags
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down Expand Up @@ -651,16 +650,15 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down Expand Up @@ -689,16 +687,15 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down Expand Up @@ -727,16 +724,15 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down Expand Up @@ -765,16 +761,15 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down Expand Up @@ -803,16 +798,15 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down Expand Up @@ -841,16 +835,15 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
Expand Down Expand Up @@ -879,16 +872,15 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=Switch(Parameters!ContrastTheme.Value="Aquatic", "#202020",
Parameters!ContrastTheme.Value="Desert", "#FFFAEF",
Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
<BackgroundColor>=code.GetTableRowFillColor(Parameters!ContrastTheme.Value, RowNumber(nothing) )</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
Expand Down Expand Up @@ -1190,6 +1182,18 @@ Parameters!ContrastTheme.Value="None", "LightSteelBlue")</BackgroundColor>
</CellDefinitions>
</GridLayoutDefinition>
</ReportParametersLayout>
<Code>Function GetTableRowFillColor(Theme as String, RowNumber As Integer) As String
If Theme ="Aquatic" Then
return "#202020"
ElseIf Theme ="Desert" Then
return "#FFFAEF"
Elseif RowNumber Mod 2 &lt;&gt; 0 Then
return "White"
Else
Return "LightSteelBlue"
End If
End Function
</Code>
<Variables>
<Variable Name="IsLocalReport">
<Value>= (Globals!ReportServerUrl="")</Value>
Expand Down
20 changes: 11 additions & 9 deletions NexusReports/Instructions.rdl
Original file line number Diff line number Diff line change
Expand Up @@ -432,19 +432,15 @@ You can add your own reports to those included with SQL Nexus by simply creating
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox15</rd:DefaultName>
<ActionInfo>
<Actions>
<Action>
<Hyperlink>http://encarta.msn.com/dictionary_/sql.html</Hyperlink>
</Action>
</Actions>
</ActionInfo>
<Top>1in</Top>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Width>0.5in</Width>
<ZIndex>16</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
Expand All @@ -471,7 +467,7 @@ You can add your own reports to those included with SQL Nexus by simply creating
<ActionInfo>
<Actions>
<Action>
<Hyperlink>http://encarta.msn.com/dictionary_/nexus.html</Hyperlink>
<Hyperlink>https://www.merriam-webster.com/dictionary/nexus</Hyperlink>
</Action>
</Actions>
</ActionInfo>
Expand All @@ -481,6 +477,9 @@ You can add your own reports to those included with SQL Nexus by simply creating
<Width>0.625in</Width>
<ZIndex>17</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
Expand Down Expand Up @@ -546,7 +545,7 @@ You can add your own reports to those included with SQL Nexus by simply creating
<ActionInfo>
<Actions>
<Action>
<Hyperlink>http://www.khen.com/sqlnexus.htm</Hyperlink>
<Hyperlink>https://github.com/microsoft/SqlNexus/wiki</Hyperlink>
</Action>
</Actions>
</ActionInfo>
Expand All @@ -556,6 +555,9 @@ You can add your own reports to those included with SQL Nexus by simply creating
<Width>0.875in</Width>
<ZIndex>20</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
Expand Down
Loading

0 comments on commit 8310c9b

Please sign in to comment.