How to populate values of a table in a PAL script PARADOX 4.x DOS

14 views
Skip to first unread message

M.Emmanuel

unread,
Jun 12, 2025, 10:43:55 AMJun 12
to TheDBCommunity
I have a calculated column in a report with the following calculation formula:

IIF([VESTING DATE]<EOY_DATE, [OUTSTANDING], 0)

So far so good.

However at the end of the report I would like to create a summary calculated field with the total.

IIF([VESTING DATE]<EOY_DATE, [OUTSTANDING]*EOY_PRICE*DIS_AVAILABLE, 0)

However, PARADOX does not let you use SUM over summary calculated formulas that use DATE fields.

Therefore I am thinking in launching the report via script and previously I would prepopulate the values of this column. Hence the summary will be over a regular field

What is the idiomatic way of PARADOX 4.x DOS to in a PAL script populate a colum  based on this formula:

IIF([VESTING DATE]<EOY_DATE, [OUTSTANDING], 0)

Thanks,

Steve Green

unread,
Jun 12, 2025, 3:39:22 PMJun 12
to 'M.Emmanuel' via TheDBCommunity

if you just make it a real field, scan the table to populate the field with the IIF, then you can do totals and subtotals in the report

--

Steven Green
Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Collectibles and Memorabilia
Vintage Lego Sets and Parts
- and Paradox support, too
--
You received this message because you are subscribed to the Google Groups "TheDBCommunity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thedbcommunit...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/thedbcommunity/6aa6850b-bc3d-4dff-8cf7-9ff22837be67n%40googlegroups.com.

Steven Green

unread,
Jun 12, 2025, 3:40:06 PMJun 12
to TheDBCommunity
 if you just make it a real field, scan the table to populate the field with the IIF, then you can do totals and subtotals in the report  

M.Emmanuel

unread,
Jun 13, 2025, 5:32:51 AMJun 13
to TheDBCommunity
Thanks, scan and regular fields makes building reports much easier. You just need a small script instead of launching the report directly
I have a question though I will do in separate thread.

; *** UPDATE LR101501 ***
EDIT "LR101501"
SCAN

  [AVAILABLE] = IIF([VESTING DATE]<EOY_DATE, [OUTSTANDING], 0)
  [BLOCKED] = IIF([VESTING DATE]<EOY_DATE, 0, [OUTSTANDING])
  [INCOME] = IIF([DIVIDEND]="Y", [OUTSTANDING], 0)

  [AVAILABLE CHF] = [AVAILABLE] * (1-DIS_AVAILABLE/100) * EOY_PRICE
  [BLOCKED CHF] = [BLOCKED] * (1-DIS_BLOCKED/100) * EOY_PRICE
  [INCOME CHF] = [INCOME] * EOY_PRICE
 
ENDSCAN
DO_IT!
Reply all
Reply to author
Forward
0 new messages