simple count
Bruce Easton
bruce at stn.com
Thu Jun 12 13:22:22 PDT 2008
Bruce Easton wrote Thursday, June 12, 2008 3:57 PM:
> [..]
> > >
> > > Scott - try this (fPseudo-coded) running *report out of fileA:
> > >
> > > If: yd eq ""
> > > Then: yd(10,mdyy/,g)=@td-"1095" 'poor man's 3 yrs ago date
> > > If:
> > > Then: lookup fileB k=(joinkey) i=[joinindex] -nx
> > > If: not fileB
> > > Then: end
> > > If: fileB(incidentdatefld#) le yd and statusfld# eq "10"
> > > Then: tl(6,.0,g)=tl+"1"
> > > If:
> > > Then: end
> > > @wgt0 If: '**or something else if it actually has to print out
> > > Then: errorbox "My total count is:"<tl
> > >
> > > ** like assign a dummy field there and put in grand total
> > > area on a format where the data area is blank (since
> > > you don't want any detail by each record).
> > >
> > > Bruce
> > >
> >
> > Actually, from what I suggested above, I think you could
> > just put the "tl" dummy in the grand-total area of the report
> > format. Also note this suggestion is intended to run
> > completely out of output processing (no selection processing).
> >
> > Bruce
>
> oh for crying out loud - i guess I have to refine this some more ...
>
> (especially if you're needing this to be a permanent function
> for someone)
>
> do this part in sort/sel prc [ -v ](but select instead of counting):
>
> > > If: yd eq ""
> > > Then: yd(10,mdyy/,g)=@td-"1095" 'poor man's 3 yrs ago date
> > > If:
> > > Then: lookup fileB k=(joinkey) i=[joinindex] -nx
> > > If: not fileB
> > > Then: end
> > > If: fileB(incidentdatefld#) le yd and statusfld# eq "10"
> > > Then: select
> > > If:
> > > Then: end
>
> (and of course it could be sped up more if you had an index built
> on that status field using the fabled lookup - technique)
>
> Then in your final output prc, i think you could
> simply have
>
> Then: end
> @wgt0 If: errorbox @ts<"Records"; end
>
>
> Bruce
All right - just one more time :) Bad example for the final output -
it should have read:
Then: end
@wgt0 If:
Then: errorbox @ts<"Records"; end
Bruce
More information about the Filepro-list
mailing list