Print problems

TeeChart for ActiveX, COM and ASP
Post Reply
wdh2880
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Location: Belgium

Print problems

Post by wdh2880 » 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

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Sep 29, 2004 6:27 pm

Hi Wim,
1. Is this a known bug for this version? If so, in which version is this solved?
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 ?
2. Any alternatives which are more stable? All we need the preview for is for choosing the printer, really.
Have you tried if it happens using the TeePreviewer component to show the Preview ? , i.e. :
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 ?
3. Advice on how to further debug this? Is it possible that the chart we're feeding in is somehow too large?
I cannot tell for sure without reproducing it.

wdh2880
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Location: Belgium

Post by wdh2880 » Thu Sep 30, 2004 10:33 am

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.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Fri Oct 01, 2004 6:46 am

Hi --
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.
Have you seen the solution in this thread?:

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/

wdh2880
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Location: Belgium

Post by wdh2880 » Fri Oct 01, 2004 3:21 pm

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

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Oct 08, 2004 4:21 pm

Hi,
I'm wondering if I should perhaps try out the evaluation version of the .Net component? Are the interfaces very much different?
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.

Post Reply