Visual Studio ReportViewer repeats the data block on each page.

I use Reportviewer to create an invoice for a sale that will be printed by the user. How can I get data fields to print on each page of a multi-page account?

Invoices are printed in pre-printed form. I want the printable to look something like this:

page 1
client john smith
123 main street.
City, CA 90000

some item1 $ 100
some item2 $ 150
some item3 $ 150


page 2
client john smith
123 main street.
City, CA 90000

some product4 $ 500
some item5 $ 250
some item6 $ 950
Total $ 2100

1 , . , , 2, , , .

, . , !

+3
3

RDLC XML. TablixColumnHierarchy . RepeatOnNewPage = true TablixMember.

, !

:

    ... 
    <TablixColumnHierarchy>
      <TablixMembers>
        <TablixMember />
        <TablixMember />
        <TablixMember />
        <TablixMember />
        <TablixMember />
        <TablixMember />
        <TablixMember />
        <TablixMember />
        <TablixMember />
        <TablixMember />
      </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
      <TablixMembers>
        <TablixMember>
          <KeepWithGroup>After</KeepWithGroup>
          <RepeatOnNewPage>true</RepeatOnNewPage>
        </TablixMember>
        <TablixMember>
          <KeepWithGroup>After</KeepWithGroup>
          <RepeatOnNewPage>true</RepeatOnNewPage>
        </TablixMember>
        <TablixMember>
          <Group Name="Details" />
          <RepeatOnNewPage>true</RepeatOnNewPage>
        </TablixMember>
      </TablixMembers>
    </TablixRowHierarchy>
    <RepeatColumnHeaders>true</RepeatColumnHeaders>
    <RepeatRowHeaders>true</RepeatRowHeaders>
    <FixedColumnHeaders>true</FixedColumnHeaders>
    <FixedRowHeaders>true</FixedRowHeaders>
    <KeepTogether>true</KeepTogether>
    <DataSetName>ds_Triangulation</DataSetName>
    ...
+3

, Table , , RepeatOnNewPage treu ,

0

GotReportViewer , , Invoice Maker, .

The trick you can use is described on this MSDN page , it involves adding the fields you want in the page title to the body of your report, then hiding the field and then in the page title, referring to a hidden text field, for example = First ( ReportItems! TxtHiddenFieldName.Value)

0
source

Source: https://habr.com/ru/post/1716667/


All Articles