Version

PhysicalPageNumber Property (ReportPagePresenter)

The physical page number of this page within the report (read-only).
Syntax
'Declaration
 
Public ReadOnly Property PhysicalPageNumber As Integer
public int PhysicalPageNumber {get;}

Property Value

A 1-based integer representing the physical page number of this page within the report.
Remarks

If there are multiple sections within a report this property continues on from the section to section.

Note: if Infragistics.Windows.Reporting.ReportSettings.HorizontalPaginationMode property is set to 'Scale' then this property will return the same value as LogicalPageNumber.

Example
The following sample shows how to set Footer to your report. Also it shows how to apply DataTemplate to show page number.

Apply DataTemplate to report's properties.
Private Sub SetReportSettings()
    Dim reportObj As New Report()
    Dim section As New EmbeddedVisualReportSection(XamDataGrid1)
    reportObj.Sections.Add(section)
    
    ' set footer template
    reportObj.PageFooterTemplate = TryCast(Me.Resources("PagePresenterFooterTemplate"), DataTemplate)
    ' set footer data
    reportObj.PageFooter = "MyFooter"
    reportObj.Print(False)
End Sub
Apply DataTemplate to report's properties.
private void SetReportSettings()
{
	Report reportObj = new Report();
	EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(XamDataGrid1);
	reportObj.Sections.Add(section);
	
	// set footer template
	reportObj.PageFooterTemplate = this.Resources["PagePresenterFooterTemplate"] as DataTemplate;
	// set footer data
	reportObj.PageFooter = "MyFooter";
	reportObj.Print(false);
}
Define DataTemplate as resource and bind the ReportPagePresenter's page numbers properties to any content presenter to display appropriate page number.
<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:igRep="http://infragistics.com/Reporting"  

>
<Page.Resources>
    <!-- DataTemplate for page footer-->
    <DataTemplate x:Key="P
agePresenterFooterTemplate">
        <Grid Height="50" HorizontalAlignment="Stretch" >

            
<Grid.RowDefinitions>
                <RowDefinition Height="12"/>
                <RowDefinition/>
            </G
rid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="5*"/>
                <C
olumnDefinition Width="*"/>
            
</Grid.ColumnDefinitions>
            
<Border BorderThickness="1" BorderBrush="Black" Height="2" Margin="20,0,20,0" VerticalAlignment="Top" Grid.ColumnSpan="2" />
            
<Label Grid.Row="1" Grid.Column="1" Content="{Binding Path=PhysicalPageNumber,
                RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type igRep:ReportPagePresenter}}}"
 Padding="0" />
            
<Label Grid.Row="1" Content="{Binding}" Padding="0" HorizontalContentAlignment="Center" />
        
</Grid>
    
</DataTemplate>
</Page.Resources>
</Page>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also