Current filter:
                                You should refresh the page.
                                  • I have an invoice report. Similar in style to your invoice report in your Demo centre, except I don't have the extra detail report section and no groupings.

                                    So I have the Page Header with a table of column headers - Name and Price, the Detail contains the values for these columns, then the Report Footer, contains a total.

                                    I want the Report Footer to be at the bottom, and the Detail area to stretch to fill the available space (so that the lines go all the way to the bottom regardless of lines.

                                    How would you recommend solving this problem? Seems quite messy to have to do it all with cross-band boxes etc, especially because I am using tables?

                                1 Solution

                                Creation Date Importance Sort by

                                Hi James,
                                If my understanding is correct, you need to use the exact approach I described in the Add empty rows to the end of the report thread. Please take a moment to review that ticket and let me know if that's what you're looking for.
                                A complete code example can be found here: XtraReport Table with empty rows

                                Regards,
                                Yaroslav

                                Show all comments
                                • James Baker 02.02.2018

                                  Thanks, I don't have horizontal lines though if that possibly makes a simpler scenario? Something like this:

                                  ----------------------------
                                  | Description |  Price |
                                  ----------------------------
                                  | Item 1         | 20.00 |
                                  | Item 2         | 30.00 |
                                  |                    |           |
                                  |                    |           |
                                  ----------------------------
                                  | Total           | 50.00 |
                                  ----------------------------

                                • James Baker 02.02.2018

                                  That solution seems more complicated that I would hope for.

                                • Andrey (DevExpress Support) 02.02.2018

                                  Hello,
                                  In case Yaroslav's solution doesn't meet your requirements, I suggest you use the XRCrossBandLine and XRCrossBandBox controls. I have attached a sample project to illustrate this approach. Please try it and let me know your result.

                                • James Baker 02.05.2018

                                  Thanks, Andrey that is basically what I have had to do, but that just results in overlapping controls. If e-mailing as HTML that is probably just going to mess up. As well as being awkward to set up.

                                  Surely there is a better way to do this? Why can the Detail section not have some stretch property? Or the Table have a cross band line, like start and end band? Maybe you could then even have a single table for the invoice report, spanning from the Report Header to Footer, with the Table header in the top. That would also safe effort trying to duplicate the table above for the detail.

                                • Andrey (DevExpress Support) 02.06.2018

                                  Hello James,

                                  Well, the suggestion you provided indeed looks useful and I agree with you that there is a possible room for improvement. This looks risky, since it may involve complexity in our page building engine and force us to maintain the code efficiency so that all possible scenarios with the unlimited level of nested detail reports, groups and other things are working correctly as well. As a side note, we thought of introducing a separate table-like report control (let's call it XRGrid or whatever) that may even provide wider functionality and capabilities like internal data filtering, sorting and etc. I believe that this scenario can be taken into account while determining its field to apply. What do you think about this, will it be helpful?

                                  As for the current alternatives, you are correct, both approaches are not easy to implement, but they allow you to achieve the main goal: stretch the entire table borders to the end of a report. I see that your main goal is to be able to send that report in an email message body, so I've prepared a sample project that uses the XtraReport.FillEmptySpace event to draw an additional table between the actual table with data and the report's footer. You'll find a sample project demonstrating this approach in the attachment. Note that to make an exported HTML file similar with a report displayed in a print preview, it is necessary to use the HtmlExportMode.SingleFilePageByPage export mode.

                                  In any case, thank you for the provided feedback and your desire to make our reporting tools more straightforward and convenient.

                                  Thanks,
                                  Andrey

                                • James Baker 02.06.2018

                                  Hmmm just the problem with this is, this seems too risky and specific for me too implement.

                                  This has come from one of our users, sometimes, there is one line on the invoice, sometimes there are hundreds. And they think it looks a bit rubbish, when there is just one line on. And their previous invoice layout, by another system did look like that.

                                  I have currently implemented the fiddly and clumsy looking cross band box solution, which should keep them happy for the time being. But if they try to start e-mailing it around, it may well come back to us.

                                  How might your suggestion of the "XRGrid" help?

                                  Something like a detail count per page field or something on the detail? Would that be more feasible? Or Detail Height (Per Page)? Or some way of using the cross band boxes, that line up next to each other and can have a field inside?? Or just some way where they wouldn't just overlap one another? I would probably prefer the cross band box (Even if it is fiddly, possibly from a table you could convert to Cross band boxes?) root over the code.

                                • Dmitry Tok (DevExpress Support) 02.07.2018

                                  Hello James,

                                  Thank you for your response.

                                  -->This has come from one of our users, sometimes, there is one line on the invoice, sometimes there are hundreds. And they think it looks a bit rubbish, when there is just one line on. And their previous invoice layout, by another system did look like that. I have currently implemented the fiddly and clumsy looking cross band box solution, which should keep them happy for the time being. But if they try to start e-mailing it around, it may well come back to us.

                                  I see this, James. So, the invoice should always occupy an entire report's page regardless of the details count. What's going to happen with this invoice further? Do they print this email message directly? I mean, is it a strict requirement to include invoice details into the email message body and not to have, for example, a PDF file attached? Meanwhile, if you are exporting such a report to an HTML file, consider using the ExportToMail method and also do not forget to disable the HtmlExportOptioms.TableLayout property, so that the resulting HTML is created using DIVs. I believe that the appearance of the file will be much closer to the original report layout in this case.

                                  -->How might your suggestion of the "XRGrid" help?

                                  By introducing the XGrid report control my colleague mentioned that this may be a completely separate data-aware report control which may have, for example, the "StretchToFill" property that will do the trick: repeat its empty rows until the end of the page is reached. I have also come up with another idea: what if we implement an additional type of a report's band that will serve exactly for this purpose: allowing you to define its layout as for any other band, but this band will be printed until the end of the page? In this case, you won't be required to operate with cross band controls, but just copy and paste your table there and clear the cells' text to repeat empty rows.

                                  In fact, we are now considering an easier and the most convenient solution for this requirement, so your input is appreciated here.

                                  Regards,
                                  Dmitry

                                • James Baker 02.07.2018

                                  Thanks, from our system the user has the option to attach as PDF to an e-mail or e-mail the report as HTML (whether they actually do this or not I would need to find out, what they do I am not currently aware). I will look into those options you suggested and see what we are currently doing. But the fiddly nature to set-up and the red overlapping controls are still major down points, especially if we are encouraging users to design these reports themselves.

                                  Yes the XGrid with a stretch to fill would be good (This sounds the easiest way so far, by just changing some options on the table?). Or your idea with the band that fills the additional space also sounds good (Would you be able to place this anywhere? i.e. for me this would want to go between the report and detail bands). Anything really that achieves the goal, in a better way than the current options.

                                • Dmitry Tok (DevExpress Support) 02.07.2018

                                  Thanks, James.

                                  Yes, I would say that avoiding the use of overlapping controls and providing a better and more straightforward way to achieve the desired document appearance is our main goal here. Personally, I like the idea with that additional band that could be located between the detail band and the other footer bands in a report, so that an empty space is filled automatically with that band content (especially when the footers are always printed at the bottom).

                                  I have added this improvement to the backlog of our product, so we'll think about a possible implementation of this functionality in the future.

                                  Thank you,
                                  Dmitry

                                • James Baker 02.08.2018

                                  Cool sounds good, thanks Dmitry.