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
Print problems
Hi Wim,
axTChart1.Printer.MarginBottom = 2;
axTChart1.Printer.MarginTop = 2;
axTChart1.Printer.MarginLeft = 2;
axTChart1.Printer.MarginRight = 2;
axTChart1.Printer.Detail = 100;
axTeePreviewer1.ChartLink = axTChart1.ChartLink;
axTeePreviewer1.ShowPreview();
Or set the printer settings in the OnBeforePrint event ?
No, it's not a known bug. I cannot reproduce it here. Could you please post a small app. into the steema.public.attachments newsgroup or send it to me directly (pep@steema.com) with which I can reproduce the problem "as is " here ?1. Is this a known bug for this version? If so, in which version is this solved?
Have you tried if it happens using the TeePreviewer component to show the Preview ? , i.e. :2. Any alternatives which are more stable? All we need the preview for is for choosing the printer, really.
axTChart1.Printer.MarginBottom = 2;
axTChart1.Printer.MarginTop = 2;
axTChart1.Printer.MarginLeft = 2;
axTChart1.Printer.MarginRight = 2;
axTChart1.Printer.Detail = 100;
axTeePreviewer1.ChartLink = axTChart1.ChartLink;
axTeePreviewer1.ShowPreview();
Or set the printer settings in the OnBeforePrint event ?
I cannot tell for sure without reproducing it.3. Advice on how to further debug this? Is it possible that the chart we're feeding in is somehow too large?
Pep Jorge
http://support.steema.com
http://support.steema.com
Thanks for the quick response.
From further debugging yesterday, I'm convinced that it has to do with changing printer destination. At one point, after I selected another printer, the names of the printers suddenly appeared in Chinese 8O
The TeePreviewer did not help.
I then turned to trying to fill in the printerindex in the OnBeforePrint Event Handler as you suggested.
I get the printerindex off of a PrintDialog.
I seem to bump into another issue: The printer I select has index 0, but is not my default printer. However when I fill in this index in the OnBeforePrint, the application always prints to the default printer. I don't know if this is related to my original problem.
From further debugging yesterday, I'm convinced that it has to do with changing printer destination. At one point, after I selected another printer, the names of the printers suddenly appeared in Chinese 8O
The TeePreviewer did not help.
I then turned to trying to fill in the printerindex in the OnBeforePrint Event Handler as you suggested.
I get the printerindex off of a PrintDialog.
I seem to bump into another issue: The printer I select has index 0, but is not my default printer. However when I fill in this index in the OnBeforePrint, the application always prints to the default printer. I don't know if this is related to my original problem.
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
http://www.teechart.net/support/modules ... pic&t=1368
Have you seen the solution in this thread?:I then turned to trying to fill in the printerindex in the OnBeforePrint Event Handler as you suggested.
I get the printerindex off of a PrintDialog.
I seem to bump into another issue: The printer I select has index 0, but is not my default printer. However when I fill in this index in the OnBeforePrint, the application always prints to the default printer. I don't know if this is related to my original problem.
http://www.teechart.net/support/modules ... pic&t=1368
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
I of course tried this BEFORE posting my original question.
I'm back to square 1: I can only print to the default printer.
It is very difficult to strip down my application to something small which exhibits the same problem.
I'm wondering if I should perhaps try out the evaluation version of the .Net component? Are the interfaces very much different?
Wim
I'm back to square 1: I can only print to the default printer.
It is very difficult to strip down my application to something small which exhibits the same problem.
I'm wondering if I should perhaps try out the evaluation version of the .Net component? Are the interfaces very much different?
Wim
Hi,
The interface is very similar, still lacking some features which are available in the ActiveX version but we're working on it and adding them for next releases.I'm wondering if I should perhaps try out the evaluation version of the .Net component? Are the interfaces very much different?
Pep Jorge
http://support.steema.com
http://support.steema.com