Welcome Guest Search | Active Topics | Sign In | Register

PageView not being linked to TabItem Options
Joan Darling
Posted: Wednesday, January 12, 2011 2:44:14 PM
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)
eo_support
Posted: Wednesday, January 12, 2011 2:52:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I believe you should use ID, not UniqueID:

.PageViewID = pageview.ID

Thanks!
Joan Darling
Posted: Tuesday, January 18, 2011 12:17:25 PM
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.
eo_support
Posted: Tuesday, January 18, 2011 1:00:45 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Great. Glad that you got it working!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.