Hi there!
Jam.py framework is using LO templates for creating reports. This can be seen in here:
https://demo.jam-py.com/
Click on Invoices, Reports, Print Invoice
This is working fine. What I do not understand is how to add an Chart on the template which will actually display data!
The area Chart IS displayed, but it is empty and showing only Legend with data. Even the Legend is not accurate representation. So it is getting some data, but not all to actually show the chart. I think the problem is a moving rows. The chart has data range which should accommodate for moving number of rows, but even with one single invoice item, so one row, it does not show anything. Obviously, an Invoice might have a number of items. So the data range changes, and the legend cell location changes as well. The legend is simple, subtotal, tax, total. Just that. At the bottom of the template. Oh, btw, the framework passes to template this 3 variables, so that is working fine. Looks like we could even pass the legend variables to a template, so all needed data can be passed to a template. But how would chart consume that?
According to Jam docs:
Reports in Jam.py are band-oriented.
Each report template is divided into bands. To set bands use the leftmost column of a template spreadsheet. In the Invoice report template there are three bands:
title, detail and summary.
In addition, templates can have programmable cells.
For example, in the template of Invoice report the I7 cell contains the text %(date)s.
Programmable cell begins with%, then follows the name of the cell in the parenthesis which is followed by character s.
All I need is a simple Chart positioned below with:
SUBTOTAL, TAX, FREIGHT
$x $y $z
But because x-amount of rows, the data range is a moving “window”.
Talked with the Jam Developer, he says no go. Any ideas from the community? Ready to raise a bounty Sorry for the long post.
Thx
PS
Added Chart on Invoice template in here:
https://conv.jampyapplicationbuilder.com/demo/
Now you can see the chart is actually showing items, instead of SUBTOTAL, TAX, FREIGHT in Legend.
Example is Invoice for Dan MIller (11/21/2018) - it has only one row and correctly displays Legend. No chart though.