getProfiles

getProfiles(): StringArray;

The getProfiles method of the JadeReportWriterReport class returns a string array of profile names. These values were set when the report was designed by using the appropriate controls in the JADE Report Writer Designer application Profile Properties dialog.

If you want to override these values at run time, you can call the setProfile method and pass as a parameter the name of the profile to use when running the report.

A report can have a number of profiles associated with it. Each profile can modify the report by having different:

This enables you to use one report layout for several different styles of report output. Use the setProfile method to set the profile that is required when the report is run.

The following example shows the use of the getProfiles method.

lstReports_click(listbox: ListBox input) updating;
vars
    repName     : String;
    jrep        : JadeReportWriterReport;
    profiles    : StringArray;
    profileName : String;
begin
    if lstReports.listIndex = -1 then
        return;
    endif;
    repName := lstReports.itemText[lstReports.listIndex];
    jrep := myJWRM.getReport(repName);
    if jrep <> null then
        create profiles transient;
        profiles := jrep.getProfiles();
        lstProfiles.clear;
        foreach profileName in profiles do
            lstProfiles.addItem(profileName);
        endforeach;
    endif;
end;