Russian print preview is correct by the printout is wrong
I am using Delphi 7 with Report Builder 10.06 Enterprise.
I have created a report under Russian Windows. The font I am using in the
Report is Arial and the font charset is set to RUSSIAN_CHARSET. When I
preview the report everything looks correct. When I print the report the
Russian text is show incorrectly but any English text is fine. The Rich Text
control does show the Russian text correctly. I have tried this with a
Russian and an English printer driver and get the same results. The Russian
text is also shown incorrectly if I save the report as a PDF and view it
form a Russian copy of Acrobat. Any ideas ?
Ian Munro
I have created a report under Russian Windows. The font I am using in the
Report is Arial and the font charset is set to RUSSIAN_CHARSET. When I
preview the report everything looks correct. When I print the report the
Russian text is show incorrectly but any English text is fine. The Rich Text
control does show the Russian text correctly. I have tried this with a
Russian and an English printer driver and get the same results. The Russian
text is also shown incorrectly if I save the report as a PDF and view it
form a Russian copy of Acrobat. Any ideas ?
Ian Munro
This discussion has been closed.
Comments
I suspect this is a printer driver issue. Try testing with a different
printer. Also, try printing from different applications, such as Word or
Wordpad to see that results are produced.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
1. PDF -> TExtraDevices for ReportBuilder.
2. Look:
procedure TfmRepAdmin.DesignerCustomSaveDoc(Sender: TObject);
var
Obj: TppComponent;
i, j: integer;
begin
for i:=0 to Designer.Report.BandCount - 1 do
for j:=0 to Designer.Report.Bands[i].ObjectCount - 1 do begin
Obj:=Designer.Report.Bands[i].Objects[j];
if Obj.HasFont and (Obj.Font.Charset <> RUSSIAN_CHARSET) then
Obj.Font.Charset:=RUSSIAN_CHARSET;
end;
Designer.Report.Template.Save;
end;
--
WBR Sergey Kovalev svk@siamed.ru
SIA International Ltd
"Ian Munro" ???????/???????? ? ???????? ?????????:
I can see what your code is doing but I'm not sure if this is a
modification to an existing function or a new one. I don't seem to have the
class TfrmRepAdmin on my computer (or at least Windows can't find it when
searching inside files). Is this part of the standard RB suite of classes ?
If this is a new function, when should it be called ? Sorry that I'm being a
bit vague but all these translation problems are starting to drain me.
Ian
Insert this code in your TppDesigner.OnCustomSaveDoc event and trouble will
be fixed.
that
the
Rich
it
Unfortunately I don't use the TppDesigner control in my project. I let
the end users select report templates that I have created. They can apply
filters to adjust the amount of data that is shown on the reports. At
runtime I create TppReport objects so that the user can have multiple
preview dialogs open. From these print preview windows they can print to a
pdf. My problem is how to hook into this printing functionality to implement
your code.
file as I can't get it to function correctly under Russian Windows.
Unfortunately I can't seem to find a way to remove the option from the Print
dialogs "print to file" listbox. Looking at the help it says to provide the
functionality I need to add "ppPDFDevice" to the uses clause. I don't have
it added so I'm now not sure how to remove this functionality. Any
suggestions ?
You can register and unregister each file device using the ppRegisterDevice
and ppUnRegisterDevice routines respectively.
ppRegisterDevice(TppPDFDevice);
ppUnRegisterDevice(TppPDFDevice);
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks, I'll give that a go.
Ian