Sort Year by Total.frx 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Report ScriptLanguage="CSharp" ReportInfo.Description="Demonstrates the following AdvMatrixObject features:&#13;&#10;- sort header element by its total value;&#13;&#10;- autosize of matrix columns" ReportInfo.Created="05/16/2008 01:44:40" ReportInfo.Modified="04/07/2023 17:56:28" ReportInfo.CreatorVersion="1.0.0.0">
  3. <Dictionary>
  4. <TableDataSource Name="MatrixDemo" ReferenceName="NorthWind.MatrixDemo" DataType="System.Int32" Enabled="true">
  5. <Column Name="Name" DataType="System.String"/>
  6. <Column Name="Year" DataType="System.Int32"/>
  7. <Column Name="Month" DataType="System.Int32"/>
  8. <Column Name="ItemsSold" DataType="System.Int32"/>
  9. <Column Name="Revenue" DataType="System.Decimal"/>
  10. </TableDataSource>
  11. </Dictionary>
  12. <ReportPage Name="Page1" Watermark.Font="Arial, 60pt">
  13. <ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8" CanGrow="true">
  14. <TextObject Name="Text1" Width="718.2" Height="37.8" Text="REVENUE BY EMPLOYEE" HorzAlign="Center" VertAlign="Center" Font="Segoe UI, 14pt, style=Bold"/>
  15. </ReportTitleBand>
  16. <DataBand Name="Data1" Top="39.8" Width="718.2" Height="87.52">
  17. <AdvMatrixObject Name="Matrix1" Left="9.45" Top="11.92" Width="287.28" Height="66.15" DataSource="MatrixDemo">
  18. <Columns>
  19. <Descriptor Expression="[MatrixDemo.Year]" Sort="Descending" SortByTotal="Sum([MatrixDemo.Revenue])"/>
  20. <Descriptor DisplayText="Total"/>
  21. </Columns>
  22. <Rows>
  23. <Descriptor Expression="[MatrixDemo.Name]"/>
  24. <Descriptor DisplayText="Total"/>
  25. </Rows>
  26. <TableColumn Name="Column1" Width="103.95" AutoSize="true"/>
  27. <TableColumn Name="Column2" Width="90.72" AutoSize="true"/>
  28. <TableColumn Name="Column3" Width="92.61" AutoSize="true"/>
  29. <TableRow Name="Row1" Height="28.35">
  30. <TableCell Name="Cell1" Border.Lines="All" Border.Color="White" Fill.Color="110, 145, 190" Text="Employee" HorzAlign="Center" VertAlign="Center" Font="Segoe UI, 9pt" TextFill.Color="White"/>
  31. <TableCell Name="Cell2" Border.Lines="All" Border.Color="White" Fill.Color="110, 145, 190" Text="[Year]" AllowExpressions="false" HorzAlign="Center" VertAlign="Center" Font="Segoe UI, 9pt" TextFill.Color="White"/>
  32. <TableCell Name="Cell7" Border.Lines="All" Border.Color="White" Fill.Color="110, 145, 190" Text="Total" HorzAlign="Center" VertAlign="Center" Font="Segoe UI, 9pt, style=Bold" TextFill.Color="White"/>
  33. </TableRow>
  34. <TableRow Name="Row2">
  35. <TableCell Name="Cell3" Border.Lines="All" Border.Color="White" Fill.Color="110, 145, 190" Text="[Name]" AllowExpressions="false" VertAlign="Center" Font="Segoe UI, 9pt" TextFill.Color="White"/>
  36. <TableCell Name="Cell4" Border.Lines="All" Border.Color="White" Fill.Color="WhiteSmoke" Text="[Sum([MatrixDemo.Revenue])]" AllowExpressions="false" Format="Currency" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Segoe UI, 9pt"/>
  37. <TableCell Name="Cell8" Border.Lines="All" Border.Color="White" Fill.Color="WhiteSmoke" Text="[Sum([MatrixDemo.Revenue])]" AllowExpressions="false" Format="Currency" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Segoe UI, 9pt"/>
  38. </TableRow>
  39. <TableRow Name="Row4">
  40. <TableCell Name="Cell5" Border.Lines="All" Border.Color="White" Fill.Color="110, 145, 190" Text="Total" HorzAlign="Center" VertAlign="Center" Font="Segoe UI, 9pt, style=Bold" TextFill.Color="White"/>
  41. <TableCell Name="Cell6" Border.Lines="All" Border.Color="White" Fill.Color="WhiteSmoke" Text="[Sum([MatrixDemo.Revenue])]" AllowExpressions="false" Format="Currency" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Segoe UI, 9pt"/>
  42. <TableCell Name="Cell9" Border.Lines="All" Border.Color="White" Fill.Color="WhiteSmoke" Text="[Sum([MatrixDemo.Revenue])]" AllowExpressions="false" Format="Currency" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Segoe UI, 9pt, style=Bold"/>
  43. </TableRow>
  44. </AdvMatrixObject>
  45. </DataBand>
  46. <PageFooterBand Name="PageFooter1" Top="129.32" Width="718.2" Height="28.35" Fill.Color="WhiteSmoke">
  47. <TextObject Name="Text12" Left="9.45" Width="217.35" Height="28.35" Cursor="Hand" Hyperlink.Value="https://www.fast-report.com/en/product/fast-report-net/" Text="Generated by FastReport" VertAlign="Center" Font="Segoe UI, 9pt, style=Underline" TextFill.Color="Blue"/>
  48. </PageFooterBand>
  49. </ReportPage>
  50. </Report>