views:

753

answers:

2

I am using Reportviewer to generate a sales invoice to be printed by the user. How can I get databound fields to be printed on every page of a multi page invoice?

The invoice is printed on a pre-printed form. I want the printed form to look roughly like:

page 1
customer john smith
123 main st.
city, CA 90000

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


page 2
customer john smith
123 main st.
city, CA 90000

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

Using 1 list which contains databound textbox fields for the customer info, and a table for the items. The problem is if there are many items such that the items flow over to page 2, the next page only contains items, and not the customer info which needs to be printed on second page as well.

I tried using page header, but I can't use databound items in page header. Please Help!

A: 

Hi, i presume you use Table in the report body just add grouping by item and in the group header put the customer info and just set RepeatOnNewPage to treu for the report header row Best Regards, Iordan

IordanTanev
A: 

A highly valuable resource is the GotReportViewer site, they have a sample there called Invoice Maker which is worth a look.

A trick you can use is described on this MSDN page, it involves adding the fields you want in the Page Header to the body of your report, then hiding the field, then in your Page Header referring to the hidden text field, e.g. =First(ReportItems!txtHiddenFieldName.Value)

Timothy Walters
Thanks for your reply. I have checked out the invoice maker sample project, it basically works the same was as mine. When I added a lot of items, page 2 shows only items. I'll check out the MSDN page, sounds like what I need.
muhan
The GotReportViewer site is a good general resource for Report Viewer information, the MSDN page article shows how to solve your actual problem.
Timothy Walters