Page 1 of 1

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

Posted: Thu Sep 15, 2022 6:49 am
by 15685014
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?

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

Posted: Thu Sep 15, 2022 9:29 am
by 15685014
Same code in .NET Framework 4.8 application (with very same Steema.TeeChart.NET version 4.2022.5.26) works as expected:
Image

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

Posted: Mon Sep 19, 2022 7:39 am
by Christopher
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.

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

Posted: Mon Sep 19, 2022 12:02 pm
by 15685014
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 :)

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

Posted: Mon Sep 19, 2022 12:24 pm
by Christopher
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.

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

Posted: Tue Sep 20, 2022 4:08 am
by 15685014
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 Дюйма :)

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

Posted: Tue Sep 20, 2022 7:43 am
by Christopher
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.

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

Posted: Tue Sep 20, 2022 10:19 am
by Christopher
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>();

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

Posted: Tue Sep 20, 2022 12:16 pm
by 15685014
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.