tChart1.Printer.Preview() is not working on .NET 5

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

tChart1.Printer.Preview() is not working on .NET 5

Post by bairog » Thu Sep 15, 2022 6:49 am

Hello.
I'm using Steema.TeeChart.NET 4.2022.5.26 (that also reproduces with latest 4.2022.8.23) in a .NET 5 Windows Forms application on Windows 10 21H2.
I just added a chart on my form and added a line in it. My code is simple:

Code: Select all

public partial class Form1 : Form
{
        public Form1()
        {
            InitializeComponent();

            line1.FillSampleValues(20);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            tChart1.Printer.Landscape = true;
            tChart1.Printer.Preview();
        }
}
But after clicking the button nothing happends at all. I have no physical printer
Image
or
Image
But all other programs (Paint .NET, etc.) display print preview dialog where all that virtual printers are listed.

So what is wrong with my code?

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by bairog » Thu Sep 15, 2022 9:29 am

Same code in .NET Framework 4.8 application (with very same Steema.TeeChart.NET version 4.2022.5.26) works as expected:
Image

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by Christopher » Mon Sep 19, 2022 7:39 am

Hello,

We've been able to reproduce this issue here and have added it to our issue tracker with id=2551. Our apologies for any inconvenience this issue may have caused, and we are looking into it now to try and get a fix out for it as soon as possible.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by bairog » Mon Sep 19, 2022 12:02 pm

Christopher wrote:
Mon Sep 19, 2022 7:39 am
We've been able to reproduce this issue here and have added it to our issue tracker with id=2551.
As I can see the issue was fixed within 1 hour - bravo! Looking forward to a nuget package update :)

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by Christopher » Mon Sep 19, 2022 12:24 pm

bairog wrote:
Mon Sep 19, 2022 12:02 pm
As I can see the issue was fixed within 1 hour - bravo! Looking forward to a nuget package update :)
I believe it is already available—do please let us know if it resolves this issue for you.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by bairog » Tue Sep 20, 2022 4:08 am

Christopher wrote:
Mon Sep 19, 2022 12:24 pm
do please let us know if it resolves this issue for you.
With latest version print preview dialog now shows up but with default (English) language. I set language in my form constructor with:

Code: Select all

Steema.TeeChart.Languages.Russian.Activate();
but print preview dialog still looks like
Image

P. S. Again, same code in application targeting .NET Framework 4.8 works correctly
Image

P. P. S. Looks like Russian translation is incomplete: 1/100 Inch should be 1/100 Дюйма :)

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by Christopher » Tue Sep 20, 2022 7:43 am

bairog wrote:
Tue Sep 20, 2022 4:08 am
With latest version print preview dialog now shows up but with default (English) language.
Excellent, so id=2551 is fixed.
bairog wrote:
Tue Sep 20, 2022 4:08 am
Steema.TeeChart.Languages.Russian.Activate();

but print preview dialog still looks like
Thank you for reporting this to us, we've added it to our issue tracker with id=2552.
bairog wrote:
Tue Sep 20, 2022 4:08 am
P. P. S. Looks like Russian translation is incomplete: 1/100 Inch should be 1/100 Дюйма :)
Again, thank you for the report, this is now in our issue tracker with id=2553.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by Christopher » Tue Sep 20, 2022 10:19 am

Christopher wrote:
Tue Sep 20, 2022 7:43 am
Thank you for reporting this to us, we've added it to our issue tracker with id=2552.
This issue has been resolved, thankfully without the need for a change in the sourcecode. To see it work, you will need to replace:

Code: Select all

Steema.TeeChart.Languages.Russian.Activate();
with:

Code: Select all

Steema.TeeChart.Languages.Russian.Activate<Steema.TeeChart.Languages.Translator>();
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: tChart1.Printer.Preview() is not working on .NET 5

Post by bairog » Tue Sep 20, 2022 12:16 pm

Christopher wrote:
Tue Sep 20, 2022 10:19 am
This issue has been resolved, thankfully without the need for a change in the sourcecode.
Technically it is working now, thank you.
But for me it is quite strange that the same operations require different client code depending on the application target platform.

Post Reply