Reporting, band inside band

Hi

I want to create a report that prints expenses and incomes for departments in a company.
I will build this “departmentsReport” entity and pass it to ReportManager.
My Entity has a list of departments and each department has 2 lists, one with expenses and one with incomes. Is it possible to create a pdf report using the attached doc template?

band.docx (13.0 KB)

Thank you

Any suggestion on this?
Thank you

Hi George,

Unfortunately, doc template doesn’t support nested bands. We have an issue: https://youtrack.cuba-platform.com/issue/PL-7516

Workaround: you can try to create HTML template and set output type PDF to the HTML template. It should work.

Thanks,
Andrey

thank you, I will try html

Kind regards

Is there any plan to fix this or is it already fixed?

The linked issue has been moved to github 2 years ago but has not been resolved.

The documentation states
Horizontal bands in DOCX and DOC cannot contain sub-bands. If you need sub-bands, use XLS(X) format. Does that mean it does work for vertical ones?

Hi Tom,

Unfortunately, sub-bands doesn’t work for DOCX. Perhaps, sub-bands can be used with different markups, e.g.:

  • with nested lists:
   - Order 1
      - Order Line 1
      - Order Line 2
   - Order 2  
  • with one table and several bands like XSL/XLSX.
  • other cases …
    It’s hard to implement all cases.
    How do you plan to use sub-bands in DOCX?

Hi @Andrey,
I don’t think my requirement is that unusual.

I just have 2 levels that i want exported. In my specific case it is about an invoice.

I have different categories of invoice items (fees, transportation costs,administratibve costs) and for each category I have a number of items. I need to enumerate the items and subtotal per category and at the end a grand total. So basically I want a table with one loop over the categories and an inner loop over the items in that category. No need for a nested table, just 2 loops.

But you might as well imagine a restaurant menu that has categories (fish, meat, vegetarian) that has different dishes with details and prices for each dish.

category I excl Vat Incl Vat
Item a 100 120
Item b 200 240
Total 300 360
category II excl Vat Incl Vat
Item x 10 12
Item y 20 24
Total 30 36

I’m rewriting a program I wrote in 2007 and used (the no-longer existing) community edition of docmosis that supported it back then.

Tom,

I suppose we can implement the case with a single table. We going to do it in one of the next releases.

Hi!
I want to create sub-band in .xlsx and highlight the shift with spaces. But as a result, white spaces are trimed. How can I achieve sub-band shift?

Thank you

image

Hello @yana.peremot,

We created a ticket for this problem.

Regards,
Nikita