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

Alvaro Soliverez asoliverez at kde.org
Sun Aug 1 20:11:14 CEST 2010


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.

>
> So i tried to implement it in my sandbox, the attached diff shows how i did
> it. Currently this patch only produces some debug messages to outline what i
> mean.
>
> Now some questions:
>
> 1. Is the approach to introduce such a new property acceptable?
>

see above. I don't think that's the way to go.

I'll clarify later on which I think is the best way.

> 2. If yes, does the patch catch all "real" data (i.e., only - and all - data
> descending directly from transactions, no headers, grouptitles and so on)?
>
> Another item:
>
> The task is to change that behavior for the above mentioned report only. This
> can be done by checking the reportname. But the reportnames are hardcoded in
> KReportsView::defaultReports. In that case (changing the behavior for a
> limited set of reports only) it would be recommendable to define the
> reportnames in another way to avoid redundancy. Alternatively this behavior
> could be applied to all reports, leaving KReportsView::defaultReports
> unchanged.
>

That can be done by checking the report type. That way, you get the
default report and all its derivatives.

Regards,
Alvaro


More information about the KMyMoney-devel mailing list