Hi, I'm trying to have a report according to my needs.
I've an attribute named dc: um that's coming from the seed component. Is a choosing dropdown list: mq, mc, kg, etc..
particularly:
the field cost_tot should be conditioned in this way:
IF dc: um is equal to mq (according with is it choose in the dc list)
THEN cost_tot is = %a-m% * cost_unit (first operator could change for ex in %v-m% if is listed mc .. and so on)
I'm novice both SD both Ruby.
Could yopu help me?
Many thanx
Pier
I link file for analysys.
Tags:
Hi Pier,
Have a look the Ruby operators.
http://www.tutorialspoint.com/ruby/ruby_operators.htm
Based on Al's example and changing the DC 'Value' to 'NUMBERS' (your component uses 'TEXT' in 'Value') where:
- 'm2' is '1'
- 'm3' is '2'
the Ruby works - PAO.pdf report attached
%dc: um% == 2 ? %cost_unit% * %area% : %cost_unit% * %volume%
Probably you have tested the option described above.
The downside is - you cannot get the 'UM' as 'm3', 'm2' on the SD report (or I don't know how to do it)
Regards
Gregory
Hi Pier,
I can see that you have tested the option already.
I typed my post yesterday and I paste it Today :) amended online but it took me more than 10 minutes and my time for changes was up !
Regards
Gregory
Enter a phrase here to search the entire Render Plus web site:
© 2024 Created by Render Plus. Powered by