Printing: "Range check error." TeeChartPro Activex
Posted: Thu Feb 19, 2004 10:42 am
Hello,
I saw some post about this error here, but there were no answers with solutions yet. Furthermore I'm using VC++6 instead of VB, if that makes a difference.
When trying to print a chart using the CTeePreviewer, I get an error message saying "Range check error." This happens when trying to print both an empty or populized chart, however, it does NOT happen each time!
For instance, I start my programm, print the empty or populated chart, all works fine. I close the program (or just the chart, does not matter), then repeat this. The same chart will print fine a few times, then suddenly I get the error message. Next time printing might work again.
While testing this behaviour, my pc was even reset 2 times (immediate black screen, Win2000 bootet again, just like you press the reset button on the machine) when trying to print.
I can reproduce this on my machine (Win2000), also a customer complained experiencing this problem on his machine (WinXP). I'm printing to acrobat distiller, my customer uses an Epson C64. So it does not seem to be printer dependent.
Using the following code to implement printing:
BOOL CGFXView::OnPreparePrinting(CPrintInfo* pInfo)
{
m_Chart.GetPrinter().SetPrintProportional(true);
m_TeePreview.SetChartLink(m_Chart.GetChartLink());
m_TeePreview.SetMaximized(true);
m_TeePreview.SetPreviewTitle("Druckvorschau");
m_TeePreview.ShowPreview();
//return DoPreparePrinting(pInfo);
return 0; // TeeChart performs printing
}
with
CTeePreviewer m_TeePreview;
CTChart m_Chart;
I get this error with both TeeChartPro Activexv5 5.0.6.0 and 5.0.4.0.
Let me know if you need more info,
thanks for your help,
Marcus Dromowicz
I saw some post about this error here, but there were no answers with solutions yet. Furthermore I'm using VC++6 instead of VB, if that makes a difference.
When trying to print a chart using the CTeePreviewer, I get an error message saying "Range check error." This happens when trying to print both an empty or populized chart, however, it does NOT happen each time!
For instance, I start my programm, print the empty or populated chart, all works fine. I close the program (or just the chart, does not matter), then repeat this. The same chart will print fine a few times, then suddenly I get the error message. Next time printing might work again.
While testing this behaviour, my pc was even reset 2 times (immediate black screen, Win2000 bootet again, just like you press the reset button on the machine) when trying to print.
I can reproduce this on my machine (Win2000), also a customer complained experiencing this problem on his machine (WinXP). I'm printing to acrobat distiller, my customer uses an Epson C64. So it does not seem to be printer dependent.
Using the following code to implement printing:
BOOL CGFXView::OnPreparePrinting(CPrintInfo* pInfo)
{
m_Chart.GetPrinter().SetPrintProportional(true);
m_TeePreview.SetChartLink(m_Chart.GetChartLink());
m_TeePreview.SetMaximized(true);
m_TeePreview.SetPreviewTitle("Druckvorschau");
m_TeePreview.ShowPreview();
//return DoPreparePrinting(pInfo);
return 0; // TeeChart performs printing
}
with
CTeePreviewer m_TeePreview;
CTChart m_Chart;
I get this error with both TeeChartPro Activexv5 5.0.6.0 and 5.0.4.0.
Let me know if you need more info,
thanks for your help,
Marcus Dromowicz