import PSXP_RPTDEFNMANAGER:*;
&LanguageCd = "ENG";
&AsOfDate = %Date;
&OutFormat = "PDF";
&MyReportName = "ENRL_VERIFY";
&MyTemplate = "ENRL_VERIFY";
Local PSXP_RPTDEFNMANAGER:ReportDefn &oReportDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&MyReportName);
&oReportDefn.Get();
Local Record &rcdQryPrompts, &RC1;
&rcdQryPrompts = &oReportDefn.GetPSQueryPromptRecord();
If Not &rcdQryPrompts = Null Then
&oReportDefn.SetPSQueryPromptRecord(&rcdQryPrompts);
&rcdQryPrompts.EMPLID.Value = X_VERIFY_WRK.EMPLID.Value;
&rcdQryPrompts.INSTITUTION.Value = X_VERIFY_WRK.INSTITUTION.Value;
&rcdQryPrompts.ACAD_CAREER.Value = X_VERIFY_WRK.ACAD_CAREER.Value;
&rcdQryPrompts.STRM.Value = X_VERIFY_WRK.STRM.Value;
End-If;
SQLExec("select TMPLDEFN_ID from PSXPRPTTMPL_VW where REPORT_DEFN_ID =:1 and LANGUAGE_CD =:2", &oReportDefn, &LanguageCd, &TemplateID);
&oReportDefn.ProcessReport(&TemplateID, &LanguageCd, &AsOfDate, &OutFormat);
CommitWork();
If All(X_VERIFY_WRK.STRM.Value) Then
&oReportDefn.DisplayOutput();
Else
Error MessageBox(0, "", 0, 0, "Please select a term from the list ");
End-If;
No comments:
Post a Comment