Paradox Community

Items in pnews.paradox-programming

Subject:Re: Calculated on Report using iif
Date:Wed, 28 Mar 2018 15:07:19 -0500
From:Mark Bannister <markRemove@THISinjection-moldings.com>
Newsgroups:pnews.paradox-programming
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$1@pnews.thedbcommunity.com...
> 
> 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 thedbcommunity.com