Bug 501686 - Investment Report blank
Summary: Investment Report blank
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: git (master)
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-18 11:08 UTC by Robby Engelmann
Modified: 2025-03-24 05:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.94
Sentry Crash Report:


Attachments
empty report (119.18 KB, image/png)
2025-03-18 11:08 UTC, Robby Engelmann
Details
empty report since this commits (180.02 KB, image/png)
2025-03-18 21:04 UTC, Robby Engelmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robby Engelmann 2025-03-18 11:08:39 UTC
Created attachment 179533 [details]
empty report

Investment Report is only showing the Investments but nothing else...
see attachment.
KMyMoney is built including the latest git commits from March, 18th. commit 17659e32


Operating System: openSUSE Tumbleweed 20250316
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.13.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i7-13700H
Memory: 64 GiB of RAM (62.5 GiB usable)
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: TUXEDO
Product Name: TUXEDO InfinityBook Pro Gen8 (MK1)
Comment 1 Ralf Habacker 2025-03-18 19:51:20 UTC
(In reply to Robby Engelmann from comment #0)
> Investment Report is only showing the Investments but nothing else...

It is not possible to reproduce the problem with this information. It would be helpful to upload a smaller test case here. On https://invent.kde.org/office/kmymoney/-/tree/master/kmymoney/plugins/views/reports/core/tests/data there are a number of KMyMoney files in XML format that can be used as a starting point.

If this is too complicated or too time-consuming, it could also help to save the KMyMoney file currently in use as an xml file, search for the corresponding <REPORT... line and insert it here.  You can find the report by name.
Comment 2 Robby Engelmann 2025-03-18 21:04:59 UTC
Created attachment 179552 [details]
empty report since this commits
Comment 3 Robby Engelmann 2025-03-18 21:05:40 UTC
I firstly saw the empty report since the integration of the commits as seen in the new attachment.
Comment 4 Robby Engelmann 2025-03-18 21:12:22 UTC
I am not sure how to get this xml file. Tried, open it in kate but looks like a binary not containing the report in question.
I am wondering, that in another File with other investments, the report still shows up with numbers in the columns. Not sure what the difference between those file is.
Comment 5 Jack 2025-03-18 21:25:57 UTC
The XML file is your data file.  If it is currently a .kmy file, then do a "Save As" and use an XML extension.  the .kmy version is just a compressed form of the xml version.
Comment 6 Ralf Habacker 2025-03-18 21:28:29 UTC
(In reply to Robby Engelmann from comment #4)
...
> I am wondering, that in another File with other investments, the report
> still shows up with numbers in the columns. 

That is my experience too with all the test files mentioned at comment 1 and more.

> Not sure what the difference between those file is.

The  associated <REPORT ... line should give some insights into why.
Comment 7 Robby Engelmann 2025-03-18 22:07:12 UTC
the not working one:
    <REPORT id="R000089" type="querytable 1.15" group="Investments" name="Investment Performance by Type - all 2025" comment="Custom Report" convertcurrency="1" favorite="1" skipZero="0" datelock="userdefined" rowtype="equitytype" querycolumns="price,performance" tax="0" propBudgetDiff="0" investments="1" loans="0" hidetransactions="0" showcolumntotals="1" detail="none" includestransfers="0" investmentsum="0">
      <DATES from="2025-01-01" to="2025-12-31"/>
    </REPORT>
Comment 8 Robby Engelmann 2025-03-18 22:10:52 UTC
the report in the file, where it is shown correctly:
    <REPORT id="R000020" type="querytable 1.15" group="Investments" name="Investment Performance by Type 2025" comment="Custom Report" convertcurrency="1" favorite="1" skipZero="0" datelock="userdefined" rowtype="equitytype" querycolumns="performance" tax="0" propBudgetDiff="0" investments="1" loans="0" hidetransactions="0" showcolumntotals="1" detail="none" includestransfers="0" investmentsum="0">
      <DATES from="2025-01-01" to="2025-12-31"/>
    </REPORT>
Comment 9 Ralf Habacker 2025-03-18 22:33:10 UTC
(In reply to Robby Engelmann from comment #7)
> the not working one:
querycolumns="price,performance" 

The difference is that the non-functioning report contains “price” in the querycolumns attribute, which is known to prevent the display of investment reports. This issue is fixed when loading the kmymoney file, does not seem to work in this case.
Please include the first ten lines of the kmymoney file that was saved as an xml file (up to </FILEINFO>) as this contains more information for an analysis.
Comment 10 Ralf Habacker 2025-03-19 06:28:27 UTC
Git commit 2a376469e934ecfe37d333fbaf25040ff8de1638 by Ralf Habacker.
Committed on 19/03/2025 at 06:27.
Pushed by habacker into branch 'master'.

Fixup for price column setup in investment reports on loading files

After fixing a bug with the mentioned commit, an increase of
the file "fix version" was required, which did not happen.

Fixup for commit 0a516a8c.
Related: bug 345550
FIXED-IN:5.1.94

M  +31   -2    kmymoney/mymoney/mymoneyfile.cpp
M  +1    -1    kmymoney/mymoney/mymoneyfile.h

https://invent.kde.org/office/kmymoney/-/commit/2a376469e934ecfe37d333fbaf25040ff8de1638
Comment 11 Robby Engelmann 2025-03-19 07:04:56 UTC
not sure whether needed:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KMYMONEY-FILE>
<KMYMONEY-FILE>
  <FILEINFO>
    <CREATION_DATE date="2011-10-28"/>
    <LAST_MODIFIED_DATE date="2025-03-18T21:55:14+01:00"/>
    <VERSION id="1"/>
    <FIXVERSION id="7"/>
    <APPVERSION id="5.1.92"/>
  </FILEINFO>
Comment 12 Ralf Habacker 2025-03-19 07:12:04 UTC
(In reply to Robby Engelmann from comment #11)
> not sure whether needed:
...
>     <FIXVERSION id="7"/>

This shows which patch level has been applied 

>     <APPVERSION id="5.1.92"/>

This shows, with which kmymoney version the file was written.

The problem has been fixed with the commit mentioned in comment 10. You need to rebuild kmymoney with this commit to get the fix.
Comment 13 Robby Engelmann 2025-03-19 07:14:05 UTC
currently building :-)
Thank you very much for the exceptional speed!
Comment 14 Ralf Habacker 2025-03-24 05:59:00 UTC
Git commit d18712f2a1be425eedbfca1c1f12bae5d9883755 by Ralf Habacker.
Committed on 24/03/2025 at 05:58.
Pushed by habacker into branch 'master'.

Use default update process to create additional columns for kmyPayees

After adding a value for the initVersion parameter to the constructor
of the MyMoneyDbTextColumn class, the standard update pattern with
alterTable() can be used.
Related: bug 345550

Fixup for commit 17659e328.

M  +2    -2    kmymoney/plugins/sql/mymoneydbdef.cpp
M  +2    -20   kmymoney/plugins/sql/mymoneystoragesql_p.h

https://invent.kde.org/office/kmymoney/-/commit/d18712f2a1be425eedbfca1c1f12bae5d9883755