[Kmymoney-devel] question on report "Investment Price Graph"

Alvaro Soliverez asoliverez at kde.org
Sun Aug 1 22:44:24 CEST 2010


On Sun, Aug 1, 2010 at 4:34 PM, Bernd Gonsior
<bernd.gonsior at googlemail.com> wrote:
> Alvaro Soliverez schrieb am 01.08.2010 20:11:
>> Hello Bernd,
>>
>> On Sun, Aug 1, 2010 at 2:38 PM, Bernd Gonsior
>>
>> <bernd.gonsior at googlemail.com> wrote:
>> > Hello Alvaro,
>> >
>> > i started with the task "to not show the data on the report charts if no
>> > price data is available". Thinking about it i thought it would be quite
>> > helpful, if there would be a property "dataAvailable" in
>> > "reports::ReportTable". One could query this property before trying to
>> > paint a chart (or print a report) and create the necessary output.
>>
>> You could check the size of the report grid for that, and it's not
>> necessary to create a new property.
>> Besides, we will change the whole data structure because it has
>> reached its limits already.
>
> Do you mean parameter "grid" in
> void KReportChartView::drawPivotChart(const PivotGrid &grid,  ...
> ?
>
> This i tried first, but the grid is hierarchical organised. That grid.size() is always 2 for all
> reports i checked - this is the number of the outergroups, which contain innergroups, which
> contain rows, among them rows for headers, (sub-)totals and so on.
>
> For the grid structure i had a look at "pivotgrid.h".
>
> Maybe there is another size - could you tell me, where?
>

I took a look at your question again, and now I see that the bug is
not clear enough.

The problem is not to hide the whole chart if the report comes up
empty. That's seldom the case and it's not a problem.

The actual intent of the bug is the following:

- you have an investment.
- that investment has prices, but not every day (eg. non-business day,
and days you didn't get a price for)
- the chart should only display those data points which you actually
have a price for


Issues:
- the engine will always return a price, even if there is no actual
price. To avoid that, you have to query in a way that will not return
a price unless there actually exists one
- KReportChartView has to handle the situation correctly



More information about the KMyMoney-devel mailing list