Payroll Envelopes using Results, help

Before you can reference a table, you must take some action to make it accessible; a find of some sort, or a create. In your original post, you referenced the PREmpMas table, as a test condition, but you had no record to match against. The example brings a record from
the PREmpMas table into memory, so that it can be used in the second part of the for each to find the relevant records. In effect, an inner join, since we will only return sets of PRempMas and PRCheck records.

HTH.

Darren Mann wrote:

> I found it, disregard last reply. Sorry. PREmpMas - spelling and no EmpId
> field in PRCheck. Thanks for the info. What does the dual Each statement
> seperate by a common do that is different??
>
> Darren
>
> > -----Original Message-----
> > From: William Colls [mailto:william@...]
> > Sent: Friday, July 14, 2000 3:41 PM
> > To: vantage@egroups.com
> > Subject: Re: [Vantage] Payroll Envelopes using Results, help.
> >
> >
> > I think your "for each" should be
> >
> > FOR EACH vantage.PRMasEmp,
> > EACH vantage.PRCheck
> > where (vantage.PRCheck.Company = vantage.PREmpMas.Company)
> > and (vantage.PRCheck.EmpID = vantage.PREmpMas.EmpID)
> > and (vantage.PRCheck.EmpLink = vantage.PREmpMas.EmpLink)
> > BREAK BY vantage.PREmpMas.EmpID:
> >
>
> ------------------------------------------------------------------------
> Still looking for the complete Application Server solution?
> Find answers and a $75 gift certificate at the Intraware App Server
> Webinar. Sign up at:
> http://click.egroups.com/1/6756/13/_/411782/_/963834647/
> ------------------------------------------------------------------------
>
> We no longer allow attachments to files. To access/share Report Files, please go to the following link: http://www.egroups.com/files/vantage/
> (Note: If this link does not work for you the first time you try it, go to www.egroups.com, login and be sure to save your password, choose My Groups, choose Vantage, then choose Files. If you save the password, the link above will work the next time you try it.)

--
/* ================================================================= */

Programmers, with their inbuilt sense of order and discipline, should really be running the world.

William E. Colls Tel 613 591 0079
PROComputer Systems Fax 613 591 3924
67 Willow Glen Dr www.procomsys.com
Kanata Ontario Canada K2M 1T1 PEG Member 1998051404

Specialists in Progress software development since 1985
I am trying to create a report that will print the Employee name and ID# to
an envelope. I used results to set this up but can not get it to work. I
have modified the FOR statement to what I think it should be, but would not
swear it is correct. Here is the program:

DEFINE VARIABLE qbf-count AS INTEGER NO-UNDO.
DEFINE VARIABLE qbf-governor AS INTEGER NO-UNDO.

DEFINE VARIABLE qbf-govcnt AS INTEGER NO-UNDO.
DEFINE VARIABLE qbf-loop AS INTEGER NO-UNDO.
DEFINE VARIABLE qbf-time AS INTEGER NO-UNDO.

DEFINE BUFFER PREmpMas FOR vantage.PREmpMas.
DEFINE BUFFER PRCheck FOR vantage.PRCheck.

ASSIGN
qbf-count = 0
qbf-governor = 0
qbf-time = TIME.

OUTPUT TO TERMINAL PAGED.

main-loop:
FOR EACH vantage.PRCheck where (vantage.PRCheck.Company =
vantage.PREmpMas.Company)
and (vantage.PRCheck.EmpID = vantage.PREmpMas.EmpID)
and (vantage.PRCheck.EmpLink =
vantage.PREmpMas.EmpLink)
BREAK BY vantage.PREmpMas.EmpID:

qbf-count = qbf-count + 1.

FORM
vantage.PREmpMas.Name COLUMN-LABEL "Name" FORMAT "X(35)"
vantage.PREmpMas.EmpID COLUMN-LABEL "ID" FORMAT "X(8)"
WITH FRAME qbf-report-1 DOWN COLUMN 1 WIDTH 64
NO-ATTR-SPACE NO-VALIDATE NO-BOX USE-TEXT STREAM-IO.

DISPLAY
vantage.PREmpMas.Name
vantage.PREmpMas.EmpID
WITH FRAME qbf-report-1.

DOWN WITH FRAME qbf-report-1.
END.

PAGE.
OUTPUT CLOSE.
RETURN.
---------------------------------------------
And here is the Compiler error it generates:

** Missing FOR, FIND or CREATE for a table with Company in current block.
(232)
** Could not understand line 19. (196)


Thanks for any assistance,

Darren Mann
Miller Products Co.
At 03:00 PM 7/14/2000 , you wrote:
>I am trying to create a report that will print the Employee name and ID# to
>an envelope. I used results to set this up but can not get it to work. I

Hey! Funny you should mention that. I just fired up Results for the first
time last night, and it looks Pretty Darned Useful. How's come I never
here it mentioned around here?

I have the on-line docs that I'm hoping to get into over the
weekend. Anyone know of other good getting-started sources, tips, or how
to things for Results ?

-Wayne
Wayne,

There has been talk that results won't be around much longer. The only
reason its there now is for pulling reports out of the Payroll module due to
coding reasons.

Eric

Continental Industries Inc.
5456 E. Mcdowell Rd.
Mesa, Az 85215
http://ciirelays.com/
mailto:e.tolliver@...

At 03:00 PM 7/14/2000 , you wrote:
>I am trying to create a report that will print the Employee name and ID# to
>an envelope. I used results to set this up but can not get it to work. I

Hey! Funny you should mention that. I just fired up Results for the first
time last night, and it looks Pretty Darned Useful. How's come I never
here it mentioned around here?

I have the on-line docs that I'm hoping to get into over the
weekend. Anyone know of other good getting-started sources, tips, or how
to things for Results ?

-Wayne
I think your "for each" should be

FOR EACH vantage.PRMasEmp,
EACH vantage.PRCheck
where (vantage.PRCheck.Company = vantage.PREmpMas.Company)
and (vantage.PRCheck.EmpID = vantage.PREmpMas.EmpID)
and (vantage.PRCheck.EmpLink = vantage.PREmpMas.EmpLink)
BREAK BY vantage.PREmpMas.EmpID:


--
/* ================================================================= */

Programmers, with their inbuilt sense of order and discipline, should really be running the world.

William E. Colls Tel 613 591 0079
PROComputer Systems Fax 613 591 3924
67 Willow Glen Dr www.procomsys.com
Kanata Ontario Canada K2M 1T1 PEG Member 1998051404

Specialists in Progress software development since 1985
I tried this "for each" line and here is the syntax error I got:

Unknown or ambiguous table PRMasEmp. (725)
** Could not understand line 19. (196)

Thanks

Darren

> -----Original Message-----
> From: William Colls [mailto:william@...]
> Sent: Friday, July 14, 2000 3:41 PM
> To: vantage@egroups.com
> Subject: Re: [Vantage] Payroll Envelopes using Results, help.
>
>
> I think your "for each" should be
>
> FOR EACH vantage.PRMasEmp,
> EACH vantage.PRCheck
> where (vantage.PRCheck.Company = vantage.PREmpMas.Company)
> and (vantage.PRCheck.EmpID = vantage.PREmpMas.EmpID)
> and (vantage.PRCheck.EmpLink = vantage.PREmpMas.EmpLink)
> BREAK BY vantage.PREmpMas.EmpID:
>
I found it, disregard last reply. Sorry. PREmpMas - spelling and no EmpId
field in PRCheck. Thanks for the info. What does the dual Each statement
seperate by a common do that is different??

Darren

> -----Original Message-----
> From: William Colls [mailto:william@...]
> Sent: Friday, July 14, 2000 3:41 PM
> To: vantage@egroups.com
> Subject: Re: [Vantage] Payroll Envelopes using Results, help.
>
>
> I think your "for each" should be
>
> FOR EACH vantage.PRMasEmp,
> EACH vantage.PRCheck
> where (vantage.PRCheck.Company = vantage.PREmpMas.Company)
> and (vantage.PRCheck.EmpID = vantage.PREmpMas.EmpID)
> and (vantage.PRCheck.EmpLink = vantage.PREmpMas.EmpLink)
> BREAK BY vantage.PREmpMas.EmpID:
>
I believe the table is called PREmpMas, not PRMasEmp.

--
/* ================================================================= */

Programmers, with their inbuilt sense of order and discipline, should really be running the world.

William E. Colls Tel 613 591 0079
PROComputer Systems Fax 613 591 3924
67 Willow Glen Dr www.procomsys.com
Kanata Ontario Canada K2M 1T1 PEG Member 1998051404

Specialists in Progress software development since 1985