Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculated expression from two expression
Message
From
29/09/2006 18:35:33
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01158307
Message ID:
01158310
Views:
16
I agree with Mike - that stuff should go into a table.

However, you may still want to avoid repeating complicated calculations, to base one field on another calculated field.

In cases like these, I sometimes create a cursor, more or less like this:
select Field1, Field2, Field1 * Field2 as Field3;
  from MyTable;
  into cursor Tmp
select *, sqrt(Field3) as Field4;
  from Tmp;
  into cursor Tmp
...
The example is arbitrary; the point is that Field4 is calculated on the basis of another calculated field.

Another possibility is to use report variables. Each variable can take into account previous report variables.

>Hi All,
>i've two field on detail band and has a below codes
>
>* for debit field
>
>IIF(crsresult.fischcode $ " '101','104','105','108','112','303','114','306','002','004','006','012','014','016','019','020','026','028','037','039','040','044','202','309','310','007','008','023','024' ",crsresult.amount,0)
>
>
>* for credit field
>
>IIF(crsresult.fischcode $ " '102','103','106','109','113','115','001','003','005','011','013','015',; '017','018','025','027','036','038','041','045','201','301','302','311',; '312','009','010','021','022' ",crsresult.amount,0)
>
>
>it works fine for my need. i wantto also show at 3rd field debit-credit action,
>expressions is too long for this :(
>
>how can i do this ?
>
>any suggestion will be very appreciated
>
>TIA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform