Can conditional statements be put in string object of the report writer?

Here's what I'm trying to do.
I have two cost fields. One delivering only, and one with delivery and
installation. We offer both prices to a customer if they request it.

The two database fields are amountdelivered and amountinstalled. Most times
the only price we give them is delivery only. In my report I want to be able
to print out the amountdelivered field only if it exists.

Something like this in a string object in the report: (bear with me I'm
still learning python)

if not self.Record['amountinstalled'] "print nothing" else "Total Cost
Delivery + Installation: %s" % self.Record['amountinstalled']

I actually tried this expression in the report but got an "invalid syntax
error".

Can something like this even be done?

-- Carey


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to