|
Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
In the code I create a pageview set it's properties, create a tabitem an set it's properties, create a report and set its properties. The tab's PageViewID property is set to that of the pageview. The report is added to the pageview and the pageview is added to it's parent division. When I run the code and view the source all the items are created properly but when I click on the tab the appropiate pageview is not displayed. What am I missing?
Code: Visual Basic.NET
pageview = New EO.Web.PageView
With pageview
.ID = String.Concat("PageView_", r_key.ToString)
.Height = New System.Web.UI.WebControls.Unit(800, UnitType.Pixel)
.Width = New System.Web.UI.WebControls.Unit(100, UnitType.Percentage)
End With
tab = tabReports.Items.Add(sr(r_key).RptTitle)
With tab
.Text.HorizontalAlign = HorizontalAlign.Center
.Text.VerticalAlign = VerticalAlign.Middle
.PageViewID = pageview.UniqueID
End With
rpt = New Microsoft.Reporting.WebForms.ReportViewer
With rpt
.Font.Name = "Verdana"
.Font.Size = 8
.Height = New System.Web.UI.WebControls.Unit(100, UnitType.Percentage)
.Width = New System.Web.UI.WebControls.Unit(100, UnitType.Percentage)
.DocumentMapWidth = sr(r_key).DocumentMapWidth
.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
.ShowCredentialPrompts = False
.ShowDocumentMapButton = False
.ShowParameterPrompts = False
.ShowPromptAreaButton = False
.ServerReport.ReportServerUrl = New System.Uri(rptpath)
.ServerReport.ReportPath = String.Concat("/", CustomerID, "/", sr(r_key).RptName)
If sr(r_key).tblSQLReportParameter.Count > 0 Then
.ServerReport.SetParameters(sr(r_key).GetParms)
End If
.ServerReport.Refresh()
End With
pageview.Controls.Add(rpt)
div_display.Controls.Add(pageview)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I believe you should use ID, not UniqueID:
.PageViewID = pageview.ID
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
Thanks, I found the issue. I was adding the pageviews to a div instead of the multipage view.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Great. Glad that you got it working!
|
|