Hi Andreas,
Andreas iCD wrote:I added the component TChartPreviewer to my project and started the preview pint dialog by something like this:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
PrintPreview.Chart:=Chart1;
PrintPreview.Execute;
end;
However, the problem is, that the preview panel of this predefined form does not display any chart diagram, the page just remains white and printing produces an empty page.
Can't reproduce this with TeeChart v2014.10 in Delphi 2010. I've created a new project, dropped a TChart, a TButton and a TChartPreviewer component to the form. Note by default the TChartPreviewer is called ChartPreviewer1 so my code looks like this:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
ChartPreviewer1.Chart:=Chart1;
ChartPreviewer1.Execute;
end;
And when I execute it, I see the chart in the preview as expected:
- 2014-04-04_1105.png (25.91 KiB) Viewed 18120 times
Andreas iCD wrote:Even if I try the following, I get the same result:
In the simple example above, I add a second TButton, TeePrevi unit to the uses clause and then I can call the code you mention. And I get the same correct result mentioned above.
Andreas iCD wrote:Of course, the original chart1 contains a visible diagram. Do you have any idea, how to solve the problem?
Check the paths in the IDE. There may be some path in the IDE or in the project pointing to an old installation.
Andreas iCD wrote:And is there any possibility to translate the controls and captions of the Previewer form into other languages?
Yes, you can translate all the editors with a single call. Ie:
Code: Select all
uses TeeTranslate, TeeCatalan;
procedure TForm1.FormCreate(Sender: TObject);
begin
TeeSetCatalan;
end;