Welcome! Log In Create A New Profile

Advanced

Chart print behaving strange

Posted by rdj 
rdj
Chart print behaving strange
May 08, 2021 04:29PM
I have a window with where I show several IW in a Tab-control
Not all IW are filled directly because some are filled after selections and 'generate'.
Normally with generating directly the export files (mostly xls) are created


In 1 of those IW I have a Comparative histogram Chart
When I call this it is normally created and looks good (1capture.png)..
Now I also want to print it automatically in a PDF file when I created it (just like my xls files)

So after processing my chartdata and chart.draw() I start my PrintPDF in my IW.
the chart is imported in the pdf with
Imgchart is image=grSaveImage(Chart)

when the file is created I get a 'stacked' ColumnChart in my output file (with the right values) (2capture.png) instead of the expected comparative histogram.

when I move the PrintPdf after the ChangeSourceWindow the same problem occurs.

Also when I save the chart to a bmp or other picture file the same problem occurs, in both situations (direct in IW or after ChangeSourceWindow).

Then I have created a 'Print' button on my IW.
so after creating all other files I go to the 'Tab' with my chart and when I then click the 'Print' button on the screen (so after it is generated) the Pdf with the correct Comparative histogram chart is created.

tried to build in a wait, once this worked after that no luck (with 1 and 2 secs).

Printing it manually is not an option because normally when generating this chart different other xls-files are also created and there will be different versions of this same chart being created automatically (and when doing this with the print button every time the 'filter' need to be changed .

It seems a 'timing' problem only putting in waits for several seconds is not really an option if I print it in automatic mode there are 50 -100 sets created (and every time with a new selection in these sets). So waits are not really an option because the run time will then extensively grow.

Any idea's how I can solve this problem?

happens in both Windev 25 and Windev 26

kind regards,

RdJ
Windev 2024/Webdev 2024



Edited 1 time(s). Last edit at 05/08/2021 04:30PM by rdj.
Attachments:
open | download - 1Capture.PNG (12.6 KB)
open | download - 2capture.png (10.2 KB)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: