Bug 405061 - No chart printing support
Summary: No chart printing support
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 4.8.3
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-04 08:46 UTC by Ralf Habacker
Modified: 2019-09-24 04:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.4, 5.0.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2019-03-04 08:46:39 UTC
KMyMoney does not support printing report as charts.

STEPS TO REPRODUCE
1. start kmymoney
2. open a file
3. choose a report from the income and expense section
4. select "chart"
5. print chart

OBSERVED RESULT
The print output shows the report as table, not as chart

EXPECTED RESULT
The print output should output the report as chart


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE_Leap_42.3
(available in About System)
KDE Frameworks Version: 5.54
Qt Version:  5.11
Comment 1 Ralf Habacker 2019-03-04 16:17:07 UTC
Git commit 2ac6eb5433f81111ae7206e84a2cfda50ddcfe7f by Ralf Habacker.
Committed on 04/03/2019 at 12:26.
Pushed by habacker into branch '4.8-staging'.

Add print support for report charts

On a printed chart, the print date and the file from which the
report was generated are added.
FIXED-IN:4.8.4

M  +17   -1    kmymoney/views/kreportsview.cpp

https://commits.kde.org/kmymoney/2ac6eb5433f81111ae7206e84a2cfda50ddcfe7f
Comment 2 Ralf Habacker 2019-03-04 16:17:09 UTC
Git commit 5b58b520edf4e830c399db2b34d75d83d97b45e4 by Ralf Habacker.
Committed on 04/03/2019 at 12:39.
Pushed by habacker into branch '4.8-staging'.

KDChart: Fix geometry change in diagram header and footer

When outputting to a printer, the geometry of a diagram changes,
but a corresponding adjustment request was not passed on to the
header and footer layout.

M  +8    -0    libkdchart/src/KDChart/KDChartChart.cpp

https://commits.kde.org/kmymoney/5b58b520edf4e830c399db2b34d75d83d97b45e4
Comment 3 Ralf Habacker 2019-03-26 23:23:46 UTC
Git commit 15ac7d472af41fc503dc5209643cfc8b392b0089 by Ralf Habacker.
Committed on 26/03/2019 at 23:20.
Pushed by habacker into branch '4.8'.

Add print support for report charts

On a printed chart, the print date and the file from which the
report was generated are added.

Print preview support requires a dedicated slot to perform the
real printing. To avoid a second refactoring this slot is already
added by this commit.
FIXED-IN:4.8.4

M  +46   -7    kmymoney/views/kreportsview.cpp
M  +2    -0    kmymoney/views/kreportsview.h

https://commits.kde.org/kmymoney/15ac7d472af41fc503dc5209643cfc8b392b0089
Comment 4 Ralf Habacker 2019-04-07 16:35:46 UTC
Git commit 50e7eb27deceb6f2c818f4c4b8ea3b39e173bfe0 by Thomas Baumgart.
Committed on 07/04/2019 14:53.
Pushed by tbaumgart into branch '5.0'.

Enable printing of charts

Ported from 2ac6eb5433f81111ae7206e84a2cfda50ddcfe7f

https://commits.kde.org/kmymoney/50e7eb27deceb6f2c818f4c4b8ea3b39e173bfe0
Comment 5 Erich 2019-09-23 22:36:28 UTC
Commit 15ac7d472af41fc503dc5209643cfc8b392b0089 breaks "Print to PDF" for me.

I noticed after upgrading to 4.8.4 that "Print to File (PDF)" no longer worked for printing report tables.  Doing a git bisect, I learned that 15ac7d472 "Add print support for report charts" is what broke "Print to File (PDF)".  Reverting this commit on top of branch 4.8 (HEAD was at 0ae5377fd "Fix reverse sort order handling in register" at time of testing) restored "Print to PDF" functionality for me.

I am using Slackware64 14.2 (latest stable version of Slackware 64-bit, with all patches installed).  KMyMoney was compiled using the build script from
https://slackbuilds.org/repository/14.2/office/kmymoney/

Steps to reproduce:
Choose Reports, 1. Income and Expenses -> Income and Expenses This Month (Default Report)
Then choose Print, Print to File (PDF).

4.8.4 fails to create the PDF (but it does ask for confirmation when trying to overwrite an existing PDF).

It gets weirder, though: on my home laptop, choosing the "Print to File (PDF)" option actually sends the job to my physical printer.  This caused me to burn through a lot of paper, because the printer is in a different room, and I didn't realize it was printing...
Comment 6 Ralf Habacker 2019-09-24 04:46:06 UTC
(In reply to Erich from comment #5)
> Commit 15ac7d472af41fc503dc5209643cfc8b392b0089 breaks "Print to PDF" for me.

I have tried to reproduce this problem on an openSUSE Linux distribution: Printing in PDF format works immediately with this patch as well, which leads me to assume that the cause of the error is somewhere else.

> It gets weirder, though: on my home laptop, choosing the "Print to File (PDF)" >option actually sends the job to my physical printer.  This caused me to burn >through a lot of paper, because the printer is in a different room, and I >didn't realize it was printing...

This is an additional indication that your printing support is broken generally.

Please file a new bug in your distribution bug tracker first, as this bug was intended to track the implementation.