>LOCAL lcSafetySet > >Set Date BRITISH >Set Mark to "-" >mclDialogForm::Init > >lcSafetySet = SET("SAFETY") >Set Safety Off >Set Nulldisplay To "" >Set Null off >Select DISTINCT ROUTE.DESC, ROUTE.ROUTE, ROUTE.DIRECTN ; > From mclMPSer!Route ; > Into TABLE csrRouteMin NOFILTER ; > Order by ROUTE.ROUTE, ROUTE.DIRECTN > >Set Safety &lcSafetySet >With thisform > .cboRoute.RowSource = "csrRouteMin.Desc,Route,Directn" > .cboRoute.Requery() >EndWith > >Select csrRouteMin >>
>With Thisform > .txtRoute.Value = this.value > .txtRoute.refresh() > .cRouteNo = this.value > .cDirectn = this.List( this.ListIndex, 3) && Directn is 3rd in list > .txtDirectn.value = .cDirectn > .txtDirectn.refresh() > .cmdPrint.enabled = .T. > .cmdPreview.enabled = .T. >EndWith >>
>With thisform > .lmCompileReport() > .cmdCancel.caption = "\<Close" > .Visible = .F. > Report Form serRouteIndex Noconsole preview > .Visible = .T. >EndWith >>
>With thisform > Do CASE && Compile detail report depending on option > Case .cAllOrIndiv = "A" && All > .cRangeText = "All Routes, ordered by Route Number?" > .lmRptByNumberSQL() > Case .cAllOrIndiv = "I" && Individual THIS IS THE ONE DONE > .cRangeText = "For Route " + ALLTRIM( .cRouteNo) + "?" && Appears in header of report > .lmRptByRteSQL() > EndCASE >EndWith >>
>LOCAL lcSafetySet > >lcSafetySet = SET("SAFETY") >Set Safety Off > >If thisform.lBothDir && "O" and "R" CHECKBOX DETERMINES THIS > SELECT Route.route, Route.gen, Route.desc, Route.directn, Route.start_date, ; > Route.end_date, IIF( Route.freeze, "** Frozen **", SPACE(12)) as Frozen, ; > Rzstop.number as Num, Allzones.zone, Allzones.desc as Zone_Desc, ; > Stop.stop_no, Stop.name as Stop_Desc ; > FROM mclmpser!route ; > LEFT OUTER JOIN mclmpser!RzStop ; > ON Route.Route == RzStop.Rte_No ; > and Route.Gen == RzStop.Rte_Let ; > and Route.Directn == RzStop.Directn ; > LEFT OUTER JOIN mclmpstop!stop ; > ON ALLTRIM( Rzstop.stop) == ALLTRIM( Stop.stop_no) ; > LEFT OUTER JOIN mclMPFac!AllZones ; > ON Rzstop.zone == Allzones.zone ; > INTO CURSOR csrRouteIndex NOFILTER ; > WHERE Route.Route == thisform.cRouteNo ; > ORDER BY Route.Route, Route.gen, Route.directn, Rzstop.number >Else && "O" or "R" selected as thisform.cDirection > && N/A >Endif >