Paradox Community

Items in pnews.paradox-programming

Subject:Re: Calculated on Report using iif
Date:Wed, 28 Mar 2018 16:21:49 -0400
From:"Kevin Baker" <>
I'll chew on this a take a stab at it in the morning.  This report shows 
Attendance for a Class (or classes) for a date range.  I have a date band on 
the report so it starts a new page for each date.  The report shows each 
person's name and either an A or P.  I'm not sure how to do all this in one 
table and not quite sure how the 1-1 link would work, but my brain is a 
little fried right now.

Thanks for the help,

"Mark Bannister"  wrote in message 

You can replace your whole table with a summary table perhaps?
Or Link your summary table 1-1 with the other table.
To link 1-1, create another table with the linking field and other
fields for your counts.

On 3/28/2018 2:58 PM, Kevin Baker wrote:
> Mark,
> I've read a little about the code on a report, but have never done it.  I 
> agree creating a summary table will give me much more options.  I create a 
> query like this:
> Query
> ANSWER: :PRIV:Summary.DB
> Atthistory.db | MemberID   | AbPr   |
>                       | calc count   | Check |
> EndQuery
> this gives me a table with:
>      |   AbPr | Count of MemberID  |
> 1   |    A     | 14                              |
> 2   |    P     |   5                              |
> I add the summary.db to the report data model, and the only way I see to 
> add this information is to add another tableframe
> Am I heading in the right direciton?
> Thanks
> Kevin
> "Mark Bannister"  wrote in message 
> news:5abbf10a$
> Kevin:
> Are you doing this in a calculated field or with code?
> In reports things are interpreted from left to right, top to bottom on
> the physical report itself.  So given two fields almost on top of each
> other, but one 1 pixel above the other, the field on pixel above
> calculates first.
> You can do this type of calculation in a report by adding code to a
> report if you are familiar with that.
> It may be easier to do your calculations before opening the report and
> have the report on a summary table that displays what you want.
> Otherwise to help we need more information.  What is the table structure
> and how is it displayed in the report?
> On 3/28/2018 2:14 PM, Kevin Baker wrote:
>> I've got a column in a report that shows either an "A" or a "P".  I'm 
>> tying to count the total A's and the total P's.
>> I've tried and failed with these:
>> Sum(iif([abpr]="A",1,0))
>> count(iif([abpr]="A",1,0))
>> not sure if this is possible.  Any ideals of how to achieve this?
>> Thanks,
>> Kevin

Copyright © 2004