Parent Module

An example of the code for a typical Wizard's parent module is displayed below.

WizardInit [
    If 1 WizardMain; 
    [ 
          Session = \GetUserSession(); 
          RHS = PageWidth – 8; 
          BOT = PageHeight – 40; 
          MID = Int(PageWidth / 2); 
          Split = MID + 40; 
          { Get parameter indices } 
          RepObj = Scope(\Code, "Report"); 
#GroupFile = GetDefaultValue(FindVariable("#GroupFile",  RepObj, 0, 0));
#OutputType = GetDefaultValue(FindVariable("#OutputType", RepObj, 0, 0));
#ReportType = GetDefaultValue(FindVariable("#ReportType", RepObj, 0, 0));
#ReportTrigger = GetDefaultValue(FindVariable("#ReportTrigger", RepObj, 0, 0));
#ReportStart = GetDefaultValue(FindVariable("#ReportStart", RepObj, 0, 0));
#ReportDuration = GetDefaultValue(FindVariable("#ReportDuration", RepObj, 0, 0));
#Workstation = GetDefaultValue(FindVariable("#Workstation", RepObj, 0, 0));
#SecurityBit = GetDefaultValue(FindVariable("#SecurityBit", RepObj, 0, 0));
          Tasks = New(3); 
          Tasks[0] = "Run report now"; 
          Tasks[1] = "Create/Modify Schedule"; 
          Tasks[2] = "Delete Schedule"; 
          Task = 0; 
          Bmps = New(3); 
Bmps[0] = MakeBitmap(\LibX\FindFile("Resources\Print Report.bmp"), 0); 
          Bmps[1] = MakeBitmap(\LibX\FindFile("Resources\Clock.bmp"), 0); 
          Bmps[2] = MakeBitmap(\LibX\FindFile("Resrouces\Recycle.bmp"), 0); 
          TaskDescs = New(3); 
TaskDescs[0] = "Define a report and run it immediately. You will have the option of saving the report definition for future re-use."; 
TaskDescs[1] = "Define a report and schedule when it should run, or modify an existing defintion/schedule."; 
          TaskDescs[2] = "Delete an existing report definition/schedule."; 
          TaskSwitch(3); 
          TaskSwitch[0] = "SelectTemplate"; 
          TaskSwitch[1] = "SelectReport"; 
          TaskSwitch[2] = "ChooseClient"; 
          OpName = Session\LockedArea; 
          OpList = \PointList("Operator"); 
          Session\ReportPanel\GetReportTypes(&ReportTemplatesList); 
{ Launch the Wizard with a blank parameter array for the point type } 
          Wizard(New(FormalParms(Variable("Report")))); 
    ] 
]
WizardMain [
    Return(Self); 
    If Cancel; 
    [ 
          Slay((Caller(Caller(Caller(Self)))), 0); 
    ] 
]