ReportWizard from Code
Hi,
I'm trying to load a report wizard directlry and then save it to a template
file. Everything works fine except that the Report wizard shows without any
captions on the buttons. I've followed the code, and the problem is in the
Wizard.LanguageChanged procedure, all calls to ppLoadStr return empty. Where
am I going wrong.
Thanks
-Jack
The following is the code I'm using, (mostly a snip of TppDesignerWindow
NewReportFromWiz).
procedure TForm1.RunWizard();
var
lWizard: TppCustomReportWizard;
lbPreview: Boolean;
begin
{FPipelineList: TppDataPipelineList; declared under private section of
form}
FPipelineList := TppDataPipelineList.Create(ppReport1);
lWizard := TppReportWizard.Create(Self);
lWizard.AskForName := False;
if (ppReport1.DataPipeline <> nil) then
lWizard.DataName := ppReport1.DataPipeline.UserName;
lWizard.OnGetDataNames := WizardGetDataNamesEvent;
lWizard.OnGetFields := WizardGetFieldsEvent;
lWizard.OnCreateReport := WizardCreateReportEvent;
lWizard.Language := ppReport1.Language;
ppReport1.BeginUpdate;
try
lbPreview := lWizard.Execute; //and (lWizard.NextAction = ppnaPreview);
finally
ppReport1.EndUpdate;
end;
I'm trying to load a report wizard directlry and then save it to a template
file. Everything works fine except that the Report wizard shows without any
captions on the buttons. I've followed the code, and the problem is in the
Wizard.LanguageChanged procedure, all calls to ppLoadStr return empty. Where
am I going wrong.
Thanks
-Jack
The following is the code I'm using, (mostly a snip of TppDesignerWindow
NewReportFromWiz).
procedure TForm1.RunWizard();
var
lWizard: TppCustomReportWizard;
lbPreview: Boolean;
begin
{FPipelineList: TppDataPipelineList; declared under private section of
form}
FPipelineList := TppDataPipelineList.Create(ppReport1);
lWizard := TppReportWizard.Create(Self);
lWizard.AskForName := False;
if (ppReport1.DataPipeline <> nil) then
lWizard.DataName := ppReport1.DataPipeline.UserName;
lWizard.OnGetDataNames := WizardGetDataNamesEvent;
lWizard.OnGetFields := WizardGetFieldsEvent;
lWizard.OnCreateReport := WizardCreateReportEvent;
lWizard.Language := ppReport1.Language;
ppReport1.BeginUpdate;
try
lbPreview := lWizard.Execute; //and (lWizard.NextAction = ppnaPreview);
finally
ppReport1.EndUpdate;
end;
This discussion has been closed.
Comments