Print problems
Posted: Wed Sep 29, 2004 9:55 am
Hi,
We're using TeeChart ActiveX v.5.0.7.0 from a .Net application written in C#.
Everything is working fine, but we have intermittent problems printing from the print preview.
Error messages include 'Range Check Error', 'Catastrophic Failure' etc.
In most cases the document does get printed.
The print preview code is pretty straightforward:
axTChart1.Printer.MarginBottom = 2;
axTChart1.Printer.MarginTop = 2;
axTChart1.Printer.MarginLeft = 2;
axTChart1.Printer.MarginRight = 2;
axTChart1.Printer.Detail = 100;
axTChart1.Printer.ShowPreview();
The Chart we're printing is using Left, Right and Bottom axes and up to 3 custom axes. Each of these axes can have several series attached to it, although the crashing happens with one graph as well.
From previous experiments, we have established that printing to the default printer with the following instructions
axTChart1.Printer.MarginBottom = 25;
axTChart1.Printer.MarginTop = 25;
axTChart1.Printer.MarginLeft = 2;
axTChart1.Printer.MarginRight = 2;
axTChart1.Printer.PrintChart();
never crashes. As soon as e.g. we try changing away from the default printer, we're in trouble though.
My questions:
1. Is this a known bug for this version? If so, in which version is this solved?
2. Any alternatives which are more stable? All we need the preview for is for choosing the printer, really.
3. Advice on how to further debug this? Is it possible that the chart we're feeding in is somehow too large?
Thanks,
Wim
We're using TeeChart ActiveX v.5.0.7.0 from a .Net application written in C#.
Everything is working fine, but we have intermittent problems printing from the print preview.
Error messages include 'Range Check Error', 'Catastrophic Failure' etc.
In most cases the document does get printed.
The print preview code is pretty straightforward:
axTChart1.Printer.MarginBottom = 2;
axTChart1.Printer.MarginTop = 2;
axTChart1.Printer.MarginLeft = 2;
axTChart1.Printer.MarginRight = 2;
axTChart1.Printer.Detail = 100;
axTChart1.Printer.ShowPreview();
The Chart we're printing is using Left, Right and Bottom axes and up to 3 custom axes. Each of these axes can have several series attached to it, although the crashing happens with one graph as well.
From previous experiments, we have established that printing to the default printer with the following instructions
axTChart1.Printer.MarginBottom = 25;
axTChart1.Printer.MarginTop = 25;
axTChart1.Printer.MarginLeft = 2;
axTChart1.Printer.MarginRight = 2;
axTChart1.Printer.PrintChart();
never crashes. As soon as e.g. we try changing away from the default printer, we're in trouble though.
My questions:
1. Is this a known bug for this version? If so, in which version is this solved?
2. Any alternatives which are more stable? All we need the preview for is for choosing the printer, really.
3. Advice on how to further debug this? Is it possible that the chart we're feeding in is somehow too large?
Thanks,
Wim