cuba-platform / yarg

Yet Another Report Generator - CUBA Platform reporting engine
https://www.cuba-platform.com
Apache License 2.0
248 stars 74 forks source link

Complex Excel formatting and other questions #25

Closed sshishkin722 closed 7 years ago

sshishkin722 commented 7 years ago

Hello!

I am search for Excel and Word reports generator and YARG looks very interesting.

I have variety of questions and there are the most important for me: 1) Can I make sorting and grouping by several columns with subtotals and "+"/"-" buttons in Excel report using YARG? 2) Can I use complex colouring (also in Excel report): one colour for odd rows, other for even rows and another for subtotal rows? 3) AFAIK I can't load data from Java ResultSet (or CachedResultSet) out of the box in the YARG. How do you think is it complicated to implement such data loader?

4.a) Can I write macros to excel file? 4.b) Can I execute macros (I think no)?

Thanks a lot!

tinhol commented 7 years ago

Hello.

  1. Unfortunately, you can only do it in the resulting document, for now YARG does not replicate groupings and sortings from the template file. Though, you still can generate the file with YARG and then adjust it with some custom code. Subtotals are usually implemented with additional band, containing formulas, referring to the main data band.

  2. Conditional coloring is supported and also all colors from the template are replicated to the resulting document.

  3. YARG separates data loading and document creation, so it introduce the BandData abstraction, to hold the loaded data. Though, you can implement a list, which will fetch data from the database on demand, would be a bit complicated. We will think about adding the feature to the roadmap.

  4. a) You can write macroses, usually you need to create XLSM file instead of XLSX.

  5. b) I can not see any way to run macroses in YARG, so usually they are launched in the resulting document, once user open it (it's supported by Office products as I can remember).

Please let me know if you have any other questions.