YiMa.Report 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package YiMa.Report --version 1.0.0                
NuGet\Install-Package YiMa.Report -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YiMa.Report" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YiMa.Report --version 1.0.0                
#r "nuget: YiMa.Report, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install YiMa.Report as a Cake Addin
#addin nuget:?package=YiMa.Report&version=1.0.0

// Install YiMa.Report as a Cake Tool
#tool nuget:?package=YiMa.Report&version=1.0.0                

Port from https://github.com/jogibear9988/YiMa.Reports

summary

  1. Replace the charts and barcode components with Oxlyplot and Zxing.net
  2. Use PdfSharp.Xps for xps2pdf
  3. Add Bindable image element.

sample

template
<FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:xrd="clr-namespace:YiMa.Reports.Document;assembly=YiMa.Report"
          xmlns:oxy="clr-namespace:YiMa.Reports.Oxyplot;assembly=YiMa.Report"
          xmlns:bar="clr-namespace:YiMa.Reports.Barcode.Document;assembly=YiMa.Report"              
           FontFamily="Arial"
          PageHeight="29.7cm" PageWidth="21cm" ColumnWidth="21cm">
<FlowDocument.Resources>
    
    <Style x:Key="headerFooterRowStyle" TargetType="{x:Type TableRowGroup}">
        <Setter Property="FontWeight" Value="DemiBold"/>
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="Background" Value="LightGray"/>
    </Style>

    
    <Style x:Key="dataRowStyle" TargetType="{x:Type TableRowGroup}">
        <Setter Property="FontSize" Value="12"/>
    </Style>

    
    <Style TargetType="{x:Type TableCell}">
        <Setter Property="Padding" Value="0.1cm"/>
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="BorderThickness" Value="0.01cm"/>
    </Style>
</FlowDocument.Resources>

 
<xrd:ReportProperties>
    <xrd:ReportProperties.ReportName>Daily Report</xrd:ReportProperties.ReportName>
    <xrd:ReportProperties.ReportTitle>Daily Report</xrd:ReportProperties.ReportTitle>
</xrd:ReportProperties>


<xrd:SectionReportHeader PageHeaderHeight="4" Padding="10,20,10,10" FontSize="12">
    <Table CellSpacing="0" BorderBrush="Black" BorderThickness="0,0,0,1">
        <Table.Columns>
            <TableColumn Width="*" />
            <TableColumn Width="*" />
            <TableColumn Width="*" />
        </Table.Columns>
        <TableRowGroup>
            <TableRow>
                <TableCell>
                    <Paragraph>
                        <xrd:InlineImage ImageID="logo" Width="100" Height="32"/>
                    </Paragraph>
                </TableCell>
                <TableCell >
                    <Paragraph >
                        <xrd:InlineContextValue PropertyName="ReportTitle"/>
                    </Paragraph>
                </TableCell>
                <TableCell>
                    <Paragraph TextAlignment="Right">
                        <bar:InlineBarcodeC128 PropertyName="Barcode" Width="200" Height="42" ShowText="True"/>
                    </Paragraph>
                </TableCell>
            </TableRow>
        </TableRowGroup>
    </Table>
</xrd:SectionReportHeader>


<xrd:SectionReportFooter PageFooterHeight="4" Padding="10,0,10,20" FontSize="12">
    <Table CellSpacing="0"  BorderBrush="Black" BorderThickness="0,1,0,0">
        <Table.Columns>
            <TableColumn Width="*" />
            <TableColumn Width="*" />
            <TableColumn Width="*" />
        </Table.Columns>
        <TableRowGroup>
            <TableRow>
                <TableCell>
                    <Paragraph>
                        <xrd:InlineDocumentValue PropertyName="CompanyName"/>
                    </Paragraph>
                </TableCell>
                <TableCell>
                    <Paragraph TextAlignment="Right">
                        Print On
                        <xrd:InlineDocumentValue PropertyName="PrintDate" Format="yyyy-MM-dd HH:mm:ss" />
                    </Paragraph>
                </TableCell>
                <TableCell>
                    <Paragraph TextAlignment="Right">
                        Page
                        <xrd:InlineContextValue PropertyName="PageNumber" FontWeight="Bold" /> of
                        <xrd:InlineContextValue PropertyName="PageCount" FontWeight="Bold" />
                    </Paragraph>
                </TableCell>
            </TableRow>
        </TableRowGroup>
    </Table>
</xrd:SectionReportFooter>


  
<Section Padding="80,20,40,10" FontSize="12" BreakPageBefore="True">
    <Paragraph FontSize="24" FontWeight="Bold" TextAlignment="Center">
        <xrd:InlineContextValue PropertyName="ReportTitle" />
    </Paragraph>

    <Paragraph>
        <xrd:InlineDocumentValue PropertyName="ReportSummary" />
    </Paragraph>    
</Section>

  
<Section Padding="80,20,40,10" FontSize="12" BreakPageBefore="True">
    <Paragraph>
        <Run>Time Counter</Run>
    </Paragraph> 
    <Paragraph>
        <oxy:OxyplotChartBase ModelName="ValueTable" Width="16cm" Height="12cm" />
    </Paragraph> 
</Section>


<Section Padding="80,20,40,10" FontSize="12">
    <Paragraph>
        <Run Text="Value Report"/>
    </Paragraph>
    <xrd:TableForDynamicDataTable TableName="ValueTable"  CellSpacing="0"
        HeaderRowStyle="{StaticResource headerFooterRowStyle}" DataRowStyle="{StaticResource dataRowStyle}" />
</Section> 
</FlowDocument>
Code
       var templateString=File.ReadAllText("your template file Name in here");
       var reportData = new ReportData();
        reportData.ReportRoot = _Setting.ReportPath;
        DateTime dateTimeStart = DateTime.Now; // start time measure here

        // set constant document values
        // print date is now
        reportData.Add("PrintDate", DateTime.Now).Add("Barcode",$"IReport{DateTime.Now.ToString("yyMMddHHmmssf")}")
            .Add("CompanyName", _Setting.CompanyName)
        .Add("CompanyIcon", _Setting.CompanyIcon);

        var report=new ReportBuilder().Bulder(reportData, templateString, "").GetFixedDocumentSequence();

        //todisplay your report in DocumentViewer component, MVVM bingding  is surported
Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.12 739 10/16/2022
1.0.11 703 10/15/2022
1.0.10 659 10/9/2022
1.0.9 711 10/7/2022
1.0.8 670 10/6/2022
1.0.7 720 9/27/2022
1.0.6 717 9/26/2022
1.0.5 697 9/26/2022
1.0.4 698 9/24/2022
1.0.2 734 9/24/2022
1.0.1 690 9/20/2022
1.0.0 718 9/19/2022