Bug 379737 - Add option to print specific report page(s)
Summary: Add option to print specific report page(s)
Status: CONFIRMED
Alias: None
Product: KEXI
Classification: Applications
Component: Reports and Printouts (show other bugs)
Version: 3.1.0 Alpha
Platform: Appimage Linux
: LO wishlist
Target Milestone: ---
Assignee: Kexi Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-11 22:32 UTC by Jarosław Staniek
Modified: 2017-07-26 18:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Report and its export (37.18 KB, image/png)
2017-05-11 22:38 UTC, Jarosław Staniek
Details
attachment-5492-0.html (2.48 KB, text/html)
2017-06-12 09:34 UTC, Jarosław Staniek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2017-05-11 22:32:26 UTC
+++ This bug was initially created as a clone of Bug #379694 +++

I have a Members Database and from this, with a Query, I select a Group of the Members.
I then created a Report to print out or email a Report for each of these selected Members.

Problem 2: Once I have the Report I want on screen I select "Report > Export as > PDF"
BUT it prints out the FIRST Report in the Group and NOT the one on-screen.

To do a lot of these it would be better if you could trigger the Report for the current Record on-screen from the Form. Is this possible??
Comment 1 Jarosław Staniek 2017-05-11 22:37:23 UTC
I've changed the topic to "Printing specific report page" (printing or exporting, the same here).

Question: do you request printing the displayed page of the current report?

What is the "FIRST Report in the Group" in your description?

On the screenshot I am attaching below I was able to open two reports and the second is current. I exported it to PDF as you can see there.

Current Kexi always exports all the pages to file. You can control what page/pages to print (either from Kexi or from a PDF viewer if you print the exported PDF) in the print dialog (Print range option). Print All is the default.

What's your request precisely?
Comment 2 Jarosław Staniek 2017-05-11 22:38:47 UTC
Created attachment 105460 [details]
Report and its export
Comment 3 Jarosław Staniek 2017-05-11 23:03:08 UTC
Waiting for details.
Comment 4 Ian Whitfield 2017-06-12 09:16:39 UTC
Thanks Jaroslaw!!

I had not "found" the 'Print > Options > Pages to Print' setting which should work fine for what I'm wanting to do. I see you also offer another option I had not thought of - ie open the whole thing in a PDF reader and print from there.

Either of these should work but I think the option to print directly from Kexi would be my preference.

I can not test this at the moment as with me working on the database Kexi deleted ALL my data when I saved the changes. (THIS HAS TO BR FIXED IMHO!!)
This is no problem as I have a backup of all the data.

BUT - A bigger problem is that I have now discovered that when Kexi deletes all the data after a save IT ALSO DELETES ANY REPORTS YOU HAVE CREATED!!

This is an equally bad situation. In my case I had spent several hours creating and laying-out a detailed report I wanted with boxes, graphics and money totals etc. In the last two weeks I have not had the time to re-create this report due to another project I'm involved with so will have to do this and test it maybe next week.

Thanks for the help as always.
Comment 5 Jarosław Staniek 2017-06-12 09:34:37 UTC
Created attachment 106054 [details]
attachment-5492-0.html

Hi Ian, I don't remember a rule that any object such as report DESIGN is
deleted after a table is deleted. If reports stop to function for you in
such case I'd recommend checking if column names have not changed.

On Monday, 12 June 2017, Ian Whitfield <bugzilla_noreply@kde.org> wrote:
> Comment # 4 on bug 379737 from Ian Whitfield
>
> Thanks Jaroslaw!!
>
> I had not "found" the 'Print > Options > Pages to Print' setting which
should
> work fine for what I'm wanting to do. I see you also offer another option
I had
> not thought of - ie open the whole thing in a PDF reader and print from
there.
>
> Either of these should work but I think the option to print directly from
Kexi
> would be my preference.
>
> I can not test this at the moment as with me working on the database Kexi
> deleted ALL my data when I saved the changes. (THIS HAS TO BR FIXED
IMHO!!)
> This is no problem as I have a backup of all the data.
>
> BUT - A bigger problem is that I have now discovered that when Kexi
deletes all
> the data after a save IT ALSO DELETES ANY REPORTS YOU HAVE CREATED!!
>
> This is an equally bad situation. In my case I had spent several hours
creating
> and laying-out a detailed report I wanted with boxes, graphics and money
totals
> etc. In the last two weeks I have not had the time to re-create this
report due
> to another project I'm involved with so will have to do this and test it
maybe
> next week.
>
> Thanks for the help as always.
>
> ________________________________
> You are receiving this mail because:
>
> You reported the bug.
> You are watching someone on the CC list of the bug.
Comment 6 Ian Whitfield 2017-06-12 13:15:00 UTC
Thanks Jaroslaw

I've looked a bit deeper and I think I must correct my statement about Kexi deleting the Report!! It seems as if it only deletes the data in the Table (Still VERY bad!!) which then causes the Query to be null and void which in turn makes the Report not to work.

The Query and the Report are  still listed but the query comes up as a total blank screen and the Report gives the error  

Opening object “invoice” failed. Switching to other view failed (Data View). 

I tested this on the DB I sent you so you should be able to check.

BTW - I just found a copy of my Report (first Layout draft) on the other computer so that will save me some work I hope. But how do I copy it from the one computer to the other?? Must I bring the whole DB over from the second machine??

Thanks as always.
Comment 7 Jarosław Staniek 2017-06-15 20:04:14 UTC
Ian,
If the new table has all the fields used by given query then the query is correct. If not, then the query needs manual correction, there's nothing computers can "guess". 

By extension, if the query that report(s) use is invalid, reports won't be able to execute them so they won't switch to data view. Correct query first...

Regarding backups of .kexi files, it's as simple as backing up files (e.g. copying). Close Kexi first before copying opened files. Mostly it means you will save unsaved data or designs before.

Copying reports from other projects (e.g. files) is not yet supported in the GUI. I can do that for you once or two times if really needed. It would be good if you file a wish about the feature.
Comment 8 Jarosław Staniek 2017-06-15 20:07:24 UTC
Summing up, let's clarify this request:

"Add option to print selected report page(s) directly from Kexi without using the print dialog's option."

Is this the actual wish?
Comment 9 Christoph Feck 2017-06-19 21:17:12 UTC
If you can provide the information requested in comment #8, please add it.
Comment 10 Christoph Feck 2017-07-09 11:33:02 UTC
To further investigate this issue, KDE developers need the information requested in comment #8. If you can provide it, or need help with finding that information, please add a comment.
Comment 11 Christoph Feck 2017-07-26 17:22:11 UTC
Jaroslaw, any more information you need from the reporter? Please set the bug status.
Comment 12 Jarosław Staniek 2017-07-26 18:35:32 UTC
Assuming this is the request.

"Add option to print selected report page(s) directly from Kexi without using the print dialog's option."

Because per Bugzilla bug (how many years? :)) the wish description cannot be edited, I am leaving the conclusion here.