Home DADE
New Blog Posts: Merging Reports - Part 1 and Part 2

Using CALC fields in SearchCriteria

edited December 2005 in DADE
Hi,

D6/ RB9.03 (definitely .03 this time!)

Am having problems adding SearchCriteria in RAP...

Have sucessfully added 6 of the 7 search criteria required, but cannot see
how to add a CALC field.

I have added in DADE a CALC field with the expression EXTRACT(MONTH FROM
LIC_DATE_FIRST_GRANTED) which is used to retrieve the month from a date - I
need to print an annual renewal letter for all licences issued in a
particular month, regardless of which year.

I can add this CALC field to the search criteria in DADE and it works fine.

My problem is that I want to add it in RAP instead once I have worked out
what month to include.

I have tried the following, but it is not working:

lSQLBuilder.SearchCriteria.Add( 'LICENCES', 'EXTRACT(MONTH FROM
LIC_DATE_FIRST_GRANTED)', '=', '11' );

DADE suggests the Table SQL Alias for the CALC field is LICENCES but when I
list out the SearchCriteria.Available fields, it is not there.

If the criteria works in DADE, I presume I should also be able to add it in
RAP. How do I do it?

The reason for wanting to do it in RAP is that the expression for the CALC
field is different for Paradox and MS SQL and I ideally need to be able to
manually code the expression and the corresponding search criteria according
to the database type. The sample above is for Paradox only. By the way, is
there an easy way in RAP of identifying what the database type is?


Regards,

Pete Colson
LalPac Ltd.
www.lalpac.com

Comments

  • edited December 2005

    I researched this and have created a patch for RB 9.03. Please send a
    request to support@digital-metaphors.com.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.