Reporting with FlowDocument
<!--Report-->
<FlowDocumentReader Name="flowdocReportViewer" ViewingMode="Scroll" IsTwoPageViewEnabled="True"
MaxZoom="200" MinZoom="80" ZoomIncrement="10" Zoom="100">
<!--Page Size: 8.5" x 11" (Using 96 dpi: 816 x 1056 px), with 0.5" margins (using 96 dpi: 48 px)-->
<FlowDocument Name="flowdocReport" FontFamily="Arial" FontSize="10"
PageWidth="816" PageHeight="1056" ColumnWidth="999999" PagePadding="48">
<!--Document Header-->
<Section Name="sectionReportHeader" LineHeight="1" Background="Lavender" Foreground="SteelBlue" ClearFloaters="None">
<!--Logo-->
<Paragraph FontSize="24" LineStackingStrategy="MaxHeight" TextAlignment="Left" >
<InlineUIContainer BaselineAlignment="Center">
<Image Source="/ezFIT;component/images/logos/Audina-Logo-Blue-248x76.png" Width="120" Margin="5"/>
</InlineUIContainer>
<TextBlock Text="{x:Static p:Resources.rsFittingReport}" Width="570" TextAlignment="Right" />
</Paragraph>
</Section>
<!--Document Content-->
<Section Name="sectionPatientInfo">
<!--Table-->
<Table BorderThickness="0" BorderBrush="Gray" CellSpacing="0" Padding="0">
<Table.Columns>
<TableColumn/>
<TableColumn/>
</Table.Columns>
<TableRowGroup>
<!--Row 1-->
<TableRow>
<TableCell FontSize="16" FontWeight="Bold" Background="Silver" ColumnSpan="2">
<Paragraph Margin="5">
<TextBlock Text="{x:Static p:Resources.rsPatientInformation}"/>
</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsName}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.FullName}"/>
<!--<tools:TBindableRun>
<tools:TBindableRun.BoundText>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="Patient.Prefix"/>
<Binding Path="Patient.FullName"/>
</MultiBinding>
</tools:TBindableRun.BoundText>
</tools:TBindableRun>-->
</Paragraph>
<List>
<!--<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsName}"/>:
<tools:TBindableRun BoundText="{Binding Path=Patient.FullName}"/>
</Paragraph>
</ListItem>-->
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsPatientID}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ID}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsGender}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.Gender, Converter={StaticResource GenderIntToString}}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsTelephone}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Telephone}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsBirthDate}"/> :
<!--<tools:TBindableRun BoundText="{Binding Path=Patient.BirthDate, StringFormat={}{0:MM/dd/yyyy}}"/>-->
<tools:TBindableRun BoundText="{Binding Path=Patient.BirthDate, StringFormat={}{0:D}, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsAddress}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Address.AddressLn1}"/>
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Address.AddressLn2}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsCity}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Address.City}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsStateProvince}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Address.StateProv}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsZIPPostalCode}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Address.PostalCode}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsCountry}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Address.Country}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsEmail}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Email}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsPhoneWork}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.PhoneWork}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsPhoneHome}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.PhoneHome}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsPhoneMobile}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.PhoneMobile}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsFax}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.ContactInfo.Fax}"/>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<TextBlock Text="{x:Static p:Resources.rsNotes}"/> :
<tools:TBindableRun BoundText="{Binding Path=Patient.Notes}"/>
</Paragraph>
</ListItem>
</List>
</TableCell>
<!--Audiogram-->
<TableCell>
<Paragraph>
<InlineUIContainer BaselineAlignment="Center">
<Image Name="imgReportAudiogram" Source="/ezFIT;component/images/img-audiogram-sample.png" Height="150" Margin="10"/>
</InlineUIContainer>
</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</Section>
<!--Instrument Settings-->
<Section Name="sectionInstrumentSettings">
<!--Table-->
<Table BorderThickness="1" BorderBrush="Gray" CellSpacing="10" Padding="0">
<Table.Columns>
<TableColumn/>
<TableColumn/>
<TableColumn/>
</Table.Columns>
<TableRowGroup>
<!--Row 1-->
<TableRow>
<TableCell BorderBrush="Gray" BorderThickness="0" Background="Pink">
<Paragraph Margin="5">
<TextBlock Text="{x:Static p:Resources.rsRight}"/>
</Paragraph>
</TableCell>
<TableCell BorderBrush="Gray" BorderThickness="0" Background="Lavender">
<Paragraph Margin="5">
<TextBlock Text="{x:Static p:Resources.rsLeft}"/></Paragraph>
</TableCell>
</TableRow>
<!--Row 2-->
<TableRow>
<TableCell>
<Paragraph>
<InlineUIContainer BaselineAlignment="Center">
<Image Source="/ezFIT;component/images/icons/icon-housing-flx.png" Height="50"/>
</InlineUIContainer>
Flx, S/N 11-123456
<LineBreak/> Circuit Firmware v1.14, Fitting Software v5.0
<LineBreak/> Fitting Type: NOAH
<LineBreak/> Coupling: Slim Tube #, Dome
<LineBreak/> Manual Controls: User VC, Gain
<LineBreak/>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
<InlineUIContainer BaselineAlignment="Center">
<Image Source="/ezFIT;component/images/icons/icon-housing-flx.png" Height="50"/>
</InlineUIContainer>
Flx, S/N 11-123456
<LineBreak/> Circuit Firmware v1.14, Fitting Software v5.0
<LineBreak/> Fitting Type: NOAH
<LineBreak/> Coupling: Slim Tube #, Dome
<LineBreak/> Manual Controls: User VC, Gain
<LineBreak/>
</Paragraph>
</TableCell>
</TableRow>
<!--Row 3-->
<TableRow>
<TableCell>
<Paragraph>Mem 1: Normal (WDRC), Indicator: Mem 1 Default</Paragraph>
</TableCell>
<TableCell>
<Paragraph>Mem 1: Normal (WDRC), Indicator: Mem 1 Default</Paragraph>
</TableCell>
</TableRow>
<!--Row 4-->
<TableRow>
<TableCell>
<Paragraph>Mem 2: Restaurant/Party, Indicator: Mem 2 Default</Paragraph>
</TableCell>
<TableCell>
<Paragraph>Mem 2: Restaurant/Party, Indicator: Mem 2 Default</Paragraph>
</TableCell>
</TableRow>
<!--Row 5-->
<TableRow>
<TableCell>
<Paragraph>Mem 3: Telephone, Indicator: Mem 3 Default</Paragraph>
</TableCell>
<TableCell>
<Paragraph>Mem 3: Telephone, Indicator: Mem 3 Default</Paragraph>
</TableCell>
</TableRow>
<!--Row 6-->
<TableRow>
<TableCell>
<Paragraph>Mem 4: Music, Indicator: Mem 4 Default</Paragraph>
</TableCell>
<TableCell>
<Paragraph>Mem 4: Music, Indicator: Mem 4 Default</Paragraph>
</TableCell>
</TableRow>
<!--Row 7-->
<TableRow>
<TableCell>
<Paragraph>Startup Delay</Paragraph>
</TableCell>
<TableCell>
<Paragraph>Startup Delay</Paragraph>
</TableCell>
</TableRow>
<!--Row 8-->
<TableRow>
<TableCell>
<Paragraph>Comments</Paragraph>
</TableCell>
<TableCell>
<Paragraph>Comments</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</Section>
<!--Instrument Parameters-->
<Section Name="sectionInstrumentLeft" BreakPageBefore="True"/>
<Section Name="sectionInstrumentRight" BreakPageBefore="True"/>
<!--Support Info (New Page)-->
<Section Name="sectionSupport">
<Paragraph BreakPageBefore="True">
<Bold>
<TextBlock Text="{x:Static p:Resources.rsSupport}"/></Bold>
<LineBreak/>
<TextBlock Text="{x:Static p:Resources.rsWebsite}"/>:
<Hyperlink NavigateUri="http://www.acmeinc.com">Acme Inc</Hyperlink>
<LineBreak/>
<TextBlock Text="{x:Static p:Resources.rsTelephone}"/>: 1-800-333-3333
</Paragraph>
<!-- <Paragraph>
Report Generated <tools:TBindableRun BoundText="{Binding}"/>
</Paragraph> -->
</Section>
</FlowDocument>
</FlowDocumentReader>