Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2009
    Posts
    21

    Unanswered: Calculated formulas to tally data

    Recently I've been trying to convert a report from Paradox for DOS to Paradox for Windows 11, however I've been unable to copy over a formula nor have I been able to recreate it.
    In a nutshell the formula is a count function which tallies the number of records which meet a set criteria. Similar to queries, except the report I'm using relies on calculated fields to display data.
    The original formula is the first formula I'm providing and my subsequent modifications are below that.

    Thank in advance for any assistance.

    COUNT(IIF([W1]="LC",IIF(ISBLANK([W2]),IIF(ISBLANK([W3]),IIF(ISBLANK([W4]),1,""),""),""),""))

    count(IIF([ASHE5-09.W1]="LC" AND ISBLANK([ASHE5-09.W2]) AND ISBLANK([ASHE5-09.W3]) AND ISBLANK([ASHE5-09.W4]),1,""))

    Numval(count((IIF([ASHE5-09.W1]="LC" AND IIF(ISBLANK([ASHE5-09.W2]) AND IIF(ISBLANK([ASHE5-09.W3]) AND IIF(ISBLANK([ASHE5-09.W4]),1,""),""),""),""))))

  2. #2
    Join Date
    Dec 2007
    Posts
    369
    [ASHE5-09.W1]

    that's not valid syntax in a PdoxWIN report.. first thing you must do is use proper syntax.. it needs to be something like

    mytable."myfield"
    --
    Steven Green - Myrtle Beach, South Carolina USA

    http://www.OasisTradingPost.com

    Oasis Trading Post
    - Collectibles and Memorabilia
    - Vintage Lego Sets and Supplies
    - and Paradox Support, too

  3. #3
    Join Date
    Aug 2009
    Posts
    21
    Hello Steve, thanks for the prompt reply -- very much appreciated.

    I tried updating the field syntax to the dot format (table-name."field") as shown below, but I'm now receiving an unknown identifier error. Does this mean I need to format the table names or iif statements differently.

    "LC"),IIF(ISBLANK(ASHE5-09."W2"),IIF(ISBLANK(ASHE5-09."W3"),IIF(ISBLANK(ASHE5-09."W4"),1,""),""),""),""))))

    Thanks again.

  4. #4
    Join Date
    Dec 2007
    Posts
    369
    I don't have pdoxwin loaded on my new laptop, so I can't test anything.. and I haven't touched a pdoxwin report in years.. have you confirmed that those functions work in a pdoxwin report, the same way as in pdoxdos?

    you might need to post on the paradox community web site, to get quick accuarate answers to this.. Home - Paradox Community
    --
    Steven Green - Myrtle Beach, South Carolina USA

    http://www.OasisTradingPost.com

    Oasis Trading Post
    - Collectibles and Memorabilia
    - Vintage Lego Sets and Supplies
    - and Paradox Support, too

  5. #5
    Join Date
    Aug 2009
    Posts
    21
    Thanks for the tip. I submitted the question to the site you mentioned, this morning, however I was just going through the Paradox 9 PAL Reference and stumbled on the section about conditional logic in calculated fields, and it turns out their example 5 is very similar to what I'm trying to complete albeit with less conditions.

    I updated my formula (as shown below) but now I'm getting a " , expected" error when running the logic so by any chance, do you have any idea where I'm missing ,'s

    numval(count(IIF([ASHE5-09.W1])="LC" AND ISBLANK(Ashe5-09.W2) AND ISBLANK([ASHE5-09.W3]) AND ISBLANK([ASHE5-09.W4]), "1", ""))

    Thanks again.
    Attached Thumbnails Attached Thumbnails Paradox Example.png  

  6. #6
    Join Date
    Dec 2007
    Posts
    369
    you posted in the right place over there.. let's see what they say..
    --
    Steven Green - Myrtle Beach, South Carolina USA

    http://www.OasisTradingPost.com

    Oasis Trading Post
    - Collectibles and Memorabilia
    - Vintage Lego Sets and Supplies
    - and Paradox Support, too

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •