Skip to content

Commit c27f7f5

Browse files
committedMay 18, 2018
Added a <thead> to column names row in the HTML reports.
Changed when/how assemblies are searched for a class that inherits BaseGraph. Search now happens when edit is first called/loaded.
1 parent ecb8173 commit c27f7f5

24 files changed

+148
-64
lines changed
 

‎Chart.js/ChartjsGraph.ascx.designer.vb

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Chart.js/ChartjsGraph.ascx.vb

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Partial Public Class ChartjsGraph
2020
doDrilldown(row)
2121
End Sub
2222

23-
'Public Overrides ReadOnly Property propertyList() As String
24-
' Get
25-
' Return "chartTitle,chartType,formatNumberScale,Height,Width,numberOfSeries,numberPrefix,numberSuffix,palette,rotateValues,displayedTextColStr,showValues,Wrap,setAdaptiveYMin,xAxisMinValue,xAxisMaxValue,yAxisMinValue,yAxisMaxValue,xAxisName,yAxisName,addtionalChartProperties,baseFontSize,baseFont,baseFontColor,labelDisplay,roundEdges,showBorder,theme,showShadow,showGradient,showPlotBorder,animation,backgroundColor,canvasColor,captionColor,showLegend,plotSpacePercent,chartColors"
26-
' End Get
27-
'End Property
23+
Public Overrides ReadOnly Property propertyList() As String
24+
Get
25+
Return "chartTitle,Height,Width,addtionalChartProperties,addtionalItemLevelProperties,beginAtZero,chartTitle,chartType,colorScheme,colorSchemeBaseColor,colorSchemedistance,colorSchemeRandomizeColorOrder,colorSchemeVariation,cornerRadius,datsetLabelsStr,defaultFontColor,defaultFontFamily,defaultFontSize,defaultFontStyle,dropShadow,dropShadowBlur,dropShadowColor,dropShadowOffsetX,dropShadowOffsetY,fillLineChart,gradient,gradientEnd,gradientEndShade,gradientStart,gradientStartShade,labelCol,numberOfSeries,valueColsStr"
26+
End Get
27+
End Property
2828

2929
Private Sub DynamicPropertyEditor1_objectPropertiesSet(ByVal objectInstance As Object) Handles propgrid.objectPropertiesSet
3030
Dim regex1 As Regex = New Regex("\x40\w+", RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.IgnorePatternWhitespace Or RegexOptions.Compiled)

‎Chart.js/My Project/Application.Designer.vb

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Chart.js/My Project/AssemblyInfo.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Imports System
1+
Imports System
22
Imports System.Reflection
33
Imports System.Runtime.InteropServices
44

‎Chart.js/My Project/Resources.Designer.vb

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Chart.js/My Project/Settings.Designer.vb

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/GraphTester.aspx.designer.vb

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/GroupedTable.vb

+8-7
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ Public Class GroupedTable
233233
Next
234234
Rows.AddAt(Rows.GetRowIndex(rowList(0)) + 1, r)
235235
If rowAfterTotal Then
236-
r = New TableRow
237-
For Each col As String In cols()
236+
r = New TableRow
237+
For Each col As String In cols()
238238
r.Cells.Add(makeCell("&nbsp;", "spacerCell"))
239239
Next
240240
Rows.AddAt(Rows.GetRowIndex(rowList(0)) + 2, r)
@@ -250,11 +250,12 @@ Public Class GroupedTable
250250

251251
'Make the header
252252
r = New TableHeaderRow
253-
For Each col As String In colLst
254-
col = col.Trim()
255-
r.Cells.Add(makeHeaderCell(col, "headerCell"))
256-
Next
257-
Rows.Add(r)
253+
For Each col As String In colLst
254+
col = col.Trim()
255+
r.Cells.Add(makeHeaderCell(col, "headerCell"))
256+
Next
257+
r.TableSection = TableRowSection.TableHeader
258+
Rows.Add(r)
258259

259260
For Each row As DataRow In DataSource.Rows
260261
r = New TableRow

‎Reporting/HtmlTableGraph.ascx.designer.vb

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/My Project/Application.Designer.vb

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/ParmDisplay.vb

+22-9
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Public Class ParmDisplay
2525
NameValueAutocomplete = 6
2626
End Enum
2727

28-
Private ReadOnly Property sqlhelper() As BaseClasses.BaseHelper
28+
Public Property controlPanel As New Panel
29+
30+
Private ReadOnly Property sqlhelper() As BaseClasses.BaseHelper
2931
Get
3032
Return parentGraph.sqlhelper
3133
End Get
@@ -124,7 +126,7 @@ Public Class ParmDisplay
124126
'End If
125127

126128
'Me.Controls.Add(New LiteralControl("<br />"))
127-
Me.Controls.Add(p)
129+
controlPanel.Controls.Add(p)
128130
Return p
129131
End If
130132
Return Nothing
@@ -215,6 +217,7 @@ Public Class ParmDisplay
215217
'If hasparms Then
216218
Me.Controls.AddAt(0, New LiteralControl("<fieldset class='reportField'><legend>" & Me.parentGraph.GraphName & "</legend>"))
217219
Me.Controls.Add(Submit)
220+
Me.Controls.Add(controlPanel)
218221
Me.Controls.Add(New LiteralControl("</fieldset>"))
219222
'End If
220223

@@ -237,12 +240,22 @@ Public Class ParmDisplay
237240
End Function
238241

239242
Private Sub ParmDisplay_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
240-
If Not Me.parentGraph.parms Is Me Then
241-
For Each parm As String In controlParmHash.Keys
242-
Me.parentGraph.parms.Controls.Add(controlParmHash(parm))
243-
Me.parentGraph.parms.Visible = True
244-
Next
245-
246-
End If
243+
For Each gr As Graph In Me.parentGraph.parentReport.GraphsList
244+
If gr.parms Is Me Then
245+
Exit For
246+
End If
247+
If gr.parms.Visible() Then
248+
For Each key As String In controlParmHash.Keys
249+
If Not gr.parms.controlParmHash.ContainsKey(key) Then
250+
gr.parms.controlParmHash.Add(key, controlParmHash(key))
251+
gr.parms.controlPanel.Controls.Add(controlParmHash(key))
252+
'Dim r As dsReports.DTIGraphParmsRow = savedparms(parmName)
253+
'Dim c As Control = addParmControl(parmName, r.DisplayName, r.Parm_Type, r.ParmProperties)
254+
'controlParmHash.Add(parmName, c)
255+
End If
256+
Next
257+
Me.Visible = False
258+
End If
259+
Next
247260
End Sub
248261
End Class

‎Reporting/QueryBuilder/QueryBuilder.aspx.designer.vb

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/Report.vb

+31-22
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,10 @@ Public Class Report
465465
i += 1
466466
Next
467467
Me.CssClass = "DTIReport"
468-
If isadmin Then
469-
ReportTitleLabel.Text = ReportName
470-
End If
471-
Controls.AddAt(0, ReportTitleLabel)
468+
'If isadmin Then
469+
ReportTitleLabel.Text = ReportName
470+
'End If
471+
Controls.AddAt(0, ReportTitleLabel)
472472
Controls.AddAt(1, New LiteralControl("<br>"))
473473
If isadmin Then
474474
Report.reghsString(Me.Page)
@@ -488,8 +488,9 @@ Public Class Report
488488
End Sub
489489

490490
Private Sub Report_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
491-
'If Me.Visible Then
492-
RaiseEvent PreInit()
491+
'If Me.Visible Then
492+
Me.ReportTitleLabel.CssClass = "ReportTitleLabel"
493+
RaiseEvent PreInit()
493494
If Me.isadmin Then
494495
try
495496
Page.EnableEventValidation = False
@@ -590,6 +591,8 @@ Public Class Report
590591
.Control_Name = "~/res/Reporting/" & graphName & "Graph.ascx"
591592
.Name = graphName
592593
End With
594+
If graphName.ToLower = "chartjs" Then row.Control_Name = "~/res/Chart.js/ChartjsGraph.ascx"
595+
593596
If Not ctrlList.Contains(row.Control_Name.ToLower) OrElse dtGraphTypes.Select("Name = '" & row.Name & "'").Length = 0 Then
594597
dtGraphTypes.AddDTIGraphTypesRow(row)
595598
ctrlList.Add(row.Control_Name.ToLower())
@@ -625,28 +628,34 @@ Public Class Report
625628

626629
'Get Graph types from the Assembly cache
627630
For Each asm As System.Reflection.Assembly In AppDomain.CurrentDomain.GetAssemblies
628-
For Each tp As Type In asm.GetTypes()
629-
If tp.IsSubclassOf(GetType(BaseGraph)) Then
630-
Dim newGraph As DTIGraphTypesRow = dtGraphTypes.NewDTIGraphTypesRow
631-
newGraph.Control_Name = "~/res/" & tp.FullName.Replace(".", "/") & ".ascx"
632-
newGraph.Name = tp.Name.Replace("Graph", "")
633-
Dim ctrlName As String = newGraph.Control_Name.ToLower
634-
foundlist.Add(ctrlName)
635-
If Not fullList.ContainsKey(ctrlName) Then
636-
'ctrlList.Add(ctrlName)
637-
fullList.Add(ctrlName, New List(Of DTIGraphTypesRow))
638-
fullList(ctrlName).Add(newGraph)
639-
dtGraphTypes.AddDTIGraphTypesRow(newGraph)
631+
Try
632+
For Each tp As Type In asm.GetTypes()
633+
If tp.IsSubclassOf(GetType(BaseGraph)) Then
634+
Dim newGraph As DTIGraphTypesRow = dtGraphTypes.NewDTIGraphTypesRow
635+
newGraph.Control_Name = "~/res/" & tp.FullName.Replace(".", "/") & ".ascx"
636+
newGraph.Name = tp.Name.Replace("Graph", "")
637+
Dim ctrlName As String = newGraph.Control_Name.ToLower
638+
foundlist.Add(ctrlName)
639+
If Not fullList.ContainsKey(ctrlName) Then
640+
'ctrlList.Add(ctrlName)
641+
fullList.Add(ctrlName, New List(Of DTIGraphTypesRow))
642+
fullList(ctrlName).Add(newGraph)
643+
dtGraphTypes.AddDTIGraphTypesRow(newGraph)
644+
End If
640645
End If
641-
End If
642-
Next
646+
Next
647+
Catch ex As Reflection.ReflectionTypeLoadException
648+
649+
End Try
643650
Next
644651

645652
Try
646-
'this update is to add any new graph types from other assemblies.
653+
'this Update Is to add any New graph types from other assemblies.
647654
myhelper.Update(dtGraphTypes)
648655
Catch ex As Exception
649-
656+
If HttpContext.Current.Request.QueryString("showerror") = "y" Then
657+
Throw ex
658+
End If
650659
End Try
651660

652661

‎Reporting/ReportGraphs.aspx.designer.vb

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/ReportGraphs.aspx.vb

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Public Partial Class ReportGraphs
2222

2323
ds.Clear()
2424
If ReportID <> -1 Then
25-
Try
25+
Try
2626
sqlhelper.FillDataSetMultiSelect("Select * from DTIReports where id = " & ReportID & "; Select * from DTIGraphs where Report_Id = " & ReportID & " order by [order];Select * from DTIGraphTypes", ds, New String() {"DTIReports", "DTIGraphs", "DTIGraphTypes"})
27-
Report.getGraphTypeList(sqlhelper, ds.DTIGraphTypes)
2827
Catch ex As Exception
29-
Report.loadDSToDatabase(sqlhelper)
28+
Report.loadDSToDatabase(sqlhelper)
3029
sqlhelper.FillDataSetMultiSelect("Select * from DTIReports where id = " & ReportID & "; Select * from DTIGraphs where Report_Id = " & ReportID & " order by [order];Select * from DTIGraphTypes", ds, New String() {"DTIReports", "DTIGraphs", "DTIGraphTypes"})
3130
End Try
3231
End If
32+
Report.getGraphTypeList(sqlhelper, ds.DTIGraphTypes)
3333

3434

3535
If ds.DTIReports.Count > 0 Then

‎Reporting/ReportParms.aspx.designer.vb

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/ReportsEdit.aspx.designer.vb

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/TableEditorGridGraph.ascx.designer.vb

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/dsReports.Designer.vb

+9-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Reporting/propertyEditor/ComparatorDS.Designer.vb

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎_reportTester/Default.aspx.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public partial class Default : BaseClasses.BaseSecurityPage
1111
{
1212
protected void Page_Load(object sender, EventArgs e)
1313
{
14-
Chart1.data = sqlHelper.FillDataTable("select * from media_types");
14+
//Chart1.data = sqlHelper.FillDataTable("select * from media_types");
1515
}
1616
}
1717
}

‎_reportTester/ReportSelector.aspx.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public partial class ReportSelector : System.Web.UI.Page
1212
{
1313
protected void Page_Load(object sender, EventArgs e)
1414
{
15-
Reporting.Report.ReportDataConnectionShared = new System.Data.SqlClient.SqlConnection(WebConfigurationManager.ConnectionStrings["phData"].ConnectionString);
15+
//Reporting.Report.ReportDataConnectionShared = new System.Data.SqlClient.SqlConnection(WebConfigurationManager.ConnectionStrings["phData"].ConnectionString);
1616
}
1717

1818
protected void btnToggleEditing_Click(object sender, EventArgs e)

‎_reportTester/Web.config

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
<add name="ConnectionString1" connectionString="Data Source=Database\chinook.db" providerName="System.Data.SqliteClient"/>
1212
<add name="ConnectionString2" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Databases\Northwind.mdf;Integrated Security=True;Connect Timeout=30" providerName="System.Data.SqlClient"/>
1313
<add name="ConnectionString3" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Databases\AdventureWorksDW2008R2_Data.mdf;Integrated Security=True;Connect Timeout=30" providerName="System.Data.SqlClient"/>
14-
<add name="ConnectionString4" connectionString="Data Source=tcp:vmdevsql03,3415;Initial Catalog=cjrcCourtReminder;Integrated Security=True" providerName="System.Data.SqlClient"/>
15-
<add name="ConnectionString" connectionString="Data Source=tcp:vmprdsql03,3415;Initial Catalog=dssScheduler;Integrated Security=True" providerName="System.Data.SqlClient"/>
14+
<add name="ConnectionString4" connectionString="Data Source=tcp:vmdevsql05,3415;Initial Catalog=cjrcCourtReminder;Integrated Security=True" providerName="System.Data.SqlClient"/>
15+
<add name="ConnectionString5" connectionString="Data Source=tcp:vmprdsql05,3415;Initial Catalog=dssScheduler;Integrated Security=True" providerName="System.Data.SqlClient"/>
16+
<add name="phData" connectionString="Data Source=tcp:vmphdevsql,3415;Initial Catalog=DurhamPHDJan2018;Integrated Security=True" providerName="System.Data.SqlClient" />
17+
<add name="ConnectionString6" connectionString="Data Source=tcp:vmprdsql05,3415;Initial Catalog=DSSForm;Integrated Security=True" providerName="System.Data.SqlClient"/>
18+
<add name="ConnectionString" connectionString="Data Source=tcp:vmprdsql05,3415;Initial Catalog=cjrcCourtReminder;Integrated Security=True" providerName="System.Data.SqlClient"/>
1619
</connectionStrings>
17-
<system.web>
20+
<system.web>
1821
<compilation debug="true" targetFramework="4.0"/>
1922
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
2023
</system.web>

‎_reportTester/tables.json.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
,"AllUsers": {"universalRelations":[{"child_cols":["InsertedBy"],"parent_cols":["UserID"]}]}
55
,"AllUsers": {"universalRelations":[{"child_cols":["LastEditedBy"],"parent_cols":["UserID"]}]}
66
,"Clinical_Data.PatientEncounter": {"universalRelations":[{"child_cols":["PatientEncounterID"],"parent_cols":["PatientEncounterID"]}]}
7-
,"InsurancePlan": {"universalRelations":[{"child_cols":["InsurancePlanID"],"parent_cols":["InsurancePlanID"]}]}
7+
,"InsurancePlan": { "universalRelations":[{ "child_cols": ["InsurancePlanID"], "parent_cols": ["InsurancePlanID"] }] }
8+
,"SlidingFeeScalePrograms": { "universalRelations":[{ "child_cols": ["SlidingFeeScaleProgramsID"], "parent_cols": ["SlidingFeeScaleProgramsID"] }] }
89
}

0 commit comments

Comments
 (0)
Please sign in to comment.