Problem with Printout (Fastreport) and Method TeeCreateMetaf

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
viper
Newbie
Newbie
Posts: 16
Joined: Mon Apr 19, 2010 12:00 am

Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by viper » Mon Mar 17, 2014 9:57 am

Hello

Since i have updated to the Version 2014 last week, i have the problem with my printouts of my Charts.

I useing Fastreport for my Reportgenerator:

Follow is the line where i print it out:

Code: Select all

  PROCEDURE TfrmVis_Grafik.frxReportChartBeforePrint(Sender: TfrxReportComponent);
  BEGIN
    IF Sender.Name = 'Picture1' THEN BEGIN
      TfrxPictureView(Sender).Picture.Assign(Chart.TeeCreateMetafile(False, Rect(0, 0, Round(Sender.Width), Round(Sender.Height))));
    END;
  END;
See attached Files what is printed:
"Aufnahme6.jpg" ist the Preview of the Chart in my Form
"Aufnahme7.jpg" is the Preview in Fastreport (Take a look to the legend)
"gktext.wmf" is the filesave of the Method TeeCreateMetafile, is also wrong!!

I think, there is a bug in the Method TeeCreateMetafile!!

Kind Regards
Gregor
Attachments
gktest.7z
(62.99 KiB) Downloaded 830 times
Aufnahme7.7z
(347.5 KiB) Downloaded 823 times
Aufnahme6.7z
(231.3 KiB) Downloaded 825 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by Yeray » Tue Mar 18, 2014 11:17 am

Hi Gregor,

I could reproduce it so I've added a new ticket to the bug tracker:
http://bugs.teechart.net/show_bug.cgi?id=643
Feel free to add your mail account to the CC list so you can be automatically notified when an update arrives.

Thanks for reporting it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

viper
Newbie
Newbie
Posts: 16
Joined: Mon Apr 19, 2010 12:00 am

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by viper » Tue Mar 18, 2014 12:44 pm

Hello Yeray

Thanks for the answer, but i found an other issue!

It's not only the checkboxes, it's also the legend itself, because it's overlaped at the left and right border see attachmend.

Kind Regards
Gregor
Attachments
Aufnahme2.7z
(346.5 KiB) Downloaded 824 times

viper
Newbie
Newbie
Posts: 16
Joined: Mon Apr 19, 2010 12:00 am

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by viper » Tue Mar 18, 2014 1:09 pm

Hello Yeray

I found some funny things. When i restore the form where are the TChart are, to a smaller size, and the i print it out. The Legend are draw correct. When i maximize my form, an the print it out, the legend overlaped left and right!

See the differences at the attached files.

Kind Regards
Gregor
Attachments
Aufnahme5.7z
(315.63 KiB) Downloaded 807 times
Aufnahme4.7z
(289.94 KiB) Downloaded 852 times
Aufnahme3.7z
(239.5 KiB) Downloaded 853 times

viper
Newbie
Newbie
Posts: 16
Joined: Mon Apr 19, 2010 12:00 am

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by viper » Tue Mar 18, 2014 1:10 pm

follow the last attachmend
Attachments
Aufnahme6.7z
(267.8 KiB) Downloaded 827 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by Yeray » Wed Mar 19, 2014 12:54 pm

Hi Gregor,
viper wrote:It's not only the checkboxes, it's also the legend itself, because it's overlaped at the left and right border see attachmend.
Do you agree it sounds similar to this?
http://bugs.teechart.net/show_bug.cgi?id=634
Since you are a source code customer, I'll send you a beta version to check if it works as you expected.

Please, tell us if any issue mentioned above are still reproducible for you with that beta.
If so, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

viper
Newbie
Newbie
Posts: 16
Joined: Mon Apr 19, 2010 12:00 am

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by viper » Wed Mar 19, 2014 2:10 pm

Hello Yeray

The Problem that i described, are exacly that what is described at the forum ID=634

I have now installed the betaversion Build 140319.

And i have also to add the follow line to my project (because of the checkboxes)

Code: Select all

USES
  VclTee.TeCanvas,
....

PROCEDURE TfrmVis_Grafik.FormCreate(Sender : TObject);
  BEGIN
    Chart.Canvas:=TTeeCanvas3D.Create;
    Chart.View3D:=false;
Whith this new version, and the additional lines, my problem are solved. Thanks.

Kind Regards
Gregor

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by Yeray » Wed Mar 19, 2014 4:54 pm

Hi Gregor,

Thanks for the feedback. I'm glad to hear it works now as you wish.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

viper
Newbie
Newbie
Posts: 2
Joined: Thu Apr 06, 2017 12:00 am
Contact:

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by viper » Wed Jun 14, 2017 2:06 pm

Hello

I just have excactly the same problem now with the newest verison TeeChartVCLFMX-2017.21 on 10.2 Tokyo!

Best Regards
Gregor

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by Yeray » Thu Jun 15, 2017 7:14 am

Hello Gregor,
viper wrote:I just have excactly the same problem now with the newest verison TeeChartVCLFMX-2017.21 on 10.2 Tokyo!
Do you mean #643 or #634?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

viper
Newbie
Newbie
Posts: 2
Joined: Thu Apr 06, 2017 12:00 am
Contact:

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by viper » Thu Jun 15, 2017 8:33 am

I mean #643
see attached Printout

Best Regards
Gregor
Attachments
Test.zip
(115.49 KiB) Downloaded 702 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with Printout (Fastreport) and Method TeeCreateMetaf

Post by Yeray » Fri Jun 16, 2017 2:39 pm

Hello,

I've just revised it for the next maintenance release.
Since you have the sources, you can remove these lines in DrawBox method in Chart.pas:

Code: Select all

      {$IFNDEF FMX}
      {$IFNDEF LCL}
      // Fix for a strange problem that worked fine in previous versions.
      // GDI+ canvas displaces the checkbox vertically up, when drawing onto a Metafile canvas.

      if (ParentChart.Canvas.ReferenceCanvas is TMetafileCanvas) and ParentChart.Canvas.SupportsAlpha then
         Inc(tmpY,13);
      {$ENDIF}
      {$ENDIF}
Don't forget to run TeeRecompile after modifying the sources to compile and install the packages in your IDE.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply