Paradox Community

Items in pnews.paradox-programming

Subject:Re: Calculated on Report using iif
Date:Wed, 28 Mar 2018 15:58:04 -0400
From:"Kevin Baker" <>

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:


Atthistory.db | MemberID   | AbPr   |
                      | calc count   | Check |


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?


"Mark Bannister"  wrote in message 

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