Ticket T275481
Visible to All Users

Report Question for Options

created 9 years ago

We have a printer defined on our network that is setup to Duplex and Staple reports.  This works great when we process reports to this printer it is one (1) job or one (1) report at a time.  But every year we run a series of reports for salesman 500+ pages, that is one SQL Select for the report, but it is all the customers.  What we would like to do is to staple each and every report.  But other than running them one at a time, we cant think of a way.  Do you have any suggestions.

Joe.

Answers approved by DevExpress Support

created 9 years ago

Hi Joe,
As far as I understand, you wish to print your reports in so-called 'batch' mode. If so, I have to note that it's not something intrinsically supported by our reporting library. Just as you mentioned, the most straightforward solution here would be to print those reports one-by-one, but without showing the PrintDialog for each of them (see the How to print multiple reports as a single batch example)
Alternatively, you can create a one large report instance grouped by the customer ID field.  So, it's one SQL query for the entire report, that would be further split into different groups ('sub reports') for each customer.  There is no problem to insert a page break before each group (GroupHeaderBand.PageBreak=BeforeBand), but you should be careful if your reports span a different number of pages. I mean, in Duplex mode, it may appear that the one side of the page prints the end of the first report, and second  - the begging of the second one. To avoid this situation, it'd be necessary to 'remember' where each report starts during the report generation, then go through the produced XtraReport.Document.Pages collection and insert blank pages at the required positions.
If you've got interested in this approach, check the following links illustrating the overall idea of the aforementioned technique:
How to: Merge the Pages of Two Reports
Display a control's page number in the report header

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.