Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

ReportWizard from Code

edited June 2003 in General
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;

Comments

  • edited June 2003
    I just found that adding ppIDE to the uses solves the problem.


This discussion has been closed.