Skip to content

Commit

Permalink
Hard coded username working, left in the AutoExecuteReport for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
PostalMike committed May 21, 2018
1 parent 02cbd3e commit 5ebcefa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
9 changes: 9 additions & 0 deletions ViewReports.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ Namespace DotNetNuke.Modules.DTSReports
Private Function AutoExecuteReport(ByVal ctlVisualizer As VisualizerControlBase, ByVal report As ReportInfo, ByRef results As DataTable, ByVal fromCache As Boolean) As Boolean
Try
results = ReportsController.ExecuteReport(report, String.Concat(ReportsController.CACHEKEY_Reports, ModuleId), report.CacheDuration <= 0, Me, fromCache)
Dim newView As DataTable = results.Clone()
For Each row As DataRow In results.Rows
Dim s As String = row.Item("User Name").ToString()
If row.Item("User Name").ToString() = "Jennifer Stavale" Then
Dim newRow As DataRow = row
newView.ImportRow(newRow)
End If
Next
results = newView
Catch ex As DataSourceException
' Display the error message to host users only
If Me.UserInfo.IsSuperUser Then
Expand Down
26 changes: 13 additions & 13 deletions Visualizers/Grid/Visualizer.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,19 @@ Namespace DotNetNuke.Modules.DTSReports.Visualizers.Grid
view.Sort = String.Format("{0} {1}", Me.SortExpr, Me.SortDir)
End If
'durthaler added code
'Dim beginDate As String = ""
'Dim endDate As String = ""
'Dim selectedName As String = ""
'Dim newView As DataView = New DataView
'If Session("selectedName") IsNot Nothing Then
' selectedName = Session("selectedName").ToString()
'End If
'If Session("beginDate") IsNot Nothing Then
' beginDate = Session("beginDate").ToString()
'End If
'If Session("endDate") IsNot Nothing Then
' endDate = Session("endDate").ToString()
'End If
Dim beginDate As String = ""
Dim endDate As String = ""
Dim selectedName As String = ""
Dim newView As DataView = New DataView
If Session("selectedName") IsNot Nothing Then
selectedName = Session("selectedName").ToString()
End If
If Session("beginDate") IsNot Nothing Then
beginDate = Session("beginDate").ToString()
End If
If Session("endDate") IsNot Nothing Then
endDate = Session("endDate").ToString()
End If
'For Each row As DataRowView In view
' Dim name = CStr(row("User Name"))
' If name = selectedName Then
Expand Down

0 comments on commit 5ebcefa

Please sign in to comment.