>* Program....: GLMAREPORTWIZARD.FINISH >* Author.....: ** Delton Lee, III ** >* Date.......: June 8, 2001 >* Description: Calls Parameter Dialog, if necessary, and fills report >*............: object properties that will be used in the custom query >*............: in the DoQuery field. >* Parameters.: tlPreview - indicates whether report is to be previewed. >* Returns....: >* Changes....: > >LPARAMETERS tlpreview > >LOCAL loParmForm, ; > lcClassName, ; > llOK > >llOK = .T. > >WITH THISFORM > > *-- If there's a dialog class specified, run it... > IF NOT EMPTY(.oReportEngine.cDlgClass) > > *-- Get the class name and run it > lcClassName = ALLTRIM(.oReportEngine.cDlgClass) > loParmForm = CREATEOBJECT(lcClassName, .oReportEngine.oReport) > loParmForm.Show() > > IF loParmForm.uRetVal = .T. > > llOK = .T. > > ELSE > > *-- User clicked the cancel button in the parameter dialog... > llOK = .F. > > ENDIF > > ENDIF > > IF llOK = .T. > > *-- If the user hasn't cancelled, continue with the report... > DODEFAULT(tlPreview) > > IF .oReportEngine.cRepType <> 'Q' > > *-- if not a quick report, we need to clear the values placed in the properties > *-- of the report object for the parameters. This is done so the next run of > *-- the report won't unknowingly use paramters from a previously run report. > .oReportEngine.oReport.ClearParmProperties() > > ENDIF > > ENDIF > >ENDWITH >>
>* Program....: RPTGLMAREPORTENGINE.SELECTREPORT >* Author.....: ** Delton Lee, III ** >* Date.......: June 22, 2001 >* Description: Runs once for each report in the reports table >* ...........: at instantiantion of Report Wizard, then runs each >*............: time a user selects a different report in the treeview. >*............: Here, I'm copying contents of fields I added to the reports >*............: table to properties of this (report engine) object. This >*............: makes them available during the Report Wizard's Finish method >*............: without necessarily having to read from the reports table directly. >*............: While we're at it, we'll copy the contents of these fields on out >*............: to the report object as well. >* Parameters.: tcReportName - >* ...........: tlSetupReport - >* Returns....: Value returned by superclass method. >* Changes....: >LPARAMETERS tcreportname,tlsetupreport > >LOCAL llRetVal, ; > loReport > >llRetVal = DODEFAULT(tcreportname,tlsetupreport) > >WITH THIS > > .cDlgClass = ALLTRIM(SFREPORTS.cDLGCLASS) >* .cDlgLib = > .cDateType = ALLTRIM(SFREPORTS.cDATETYPE) >* .cTechNote > .cRepType = SFREPORTS.REP_TYPE > .cParmTypes = ALLTRIM(SFREPORTS.cPARMTYPES) > .cSecurity = ALLTRIM(SFREPORTS.cSECURITY) > .lConverted = SFREPORTS.lConverted > > loReport = .oReportCollection.Item(tcReportName) > > *-- Copy properties to report object only if it's a "standard" report > *-- because Quick reports are instantiated from a super class that > *-- does not have these properties defined. > IF .cRepType = 'S' > > loReport.cRepType = .cRepType > loReport.cDlgClass = .cDlgClass > loReport.cDateType = .cDateType > loReport.cParmTypes = .cParmTypes > loReport.cSecurity = .cSecurity > loReport.lConverted = .lConverted > > ENDIF > >ENDWITH > >RETURN llRetVal >