Formula to view data RRS feed

  • Question

  • Hi,
    I have a report, which gets data from Oracle Database to generate report. I have a parameter field, based on the parameter value, the report will view the records. I need to check the length of the Parameter value, if the value is, assume 4, it should compare that value with the records of a field, say field1. if the length of the parameter value is greater than 4, it should view records, comparing that value with another field, say field2.

    How could i do this? Kindly help me in this. I am executing the report from VB 6 application and i send the parameter value from VB 6 environment.

    Thanks and Regards

    Thursday, August 11, 2005 1:30 PM


  • Hello Deepak,

    Is this parameter field a Crystal Reports parameter field? When you say that you send the parameter from VB 6 - you mean that is to the report?

    If so then you should be able to do most of this in the record selection formula for the report.

    There is a Length() function in the record selection that returns the length of a string as an integer - record selection could be something like:

    If Length({databasetable.field}) < 4 then {Parameter Field} = {databasetable.field1}

    {Parameter Field} = {databasetable.field2}

    Keith - Business Objects
    Friday, August 12, 2005 3:42 PM