XML <IF> condition


W

wssr

Following code segment looks good but the <IF> equates to true always and all
departments print... What am I doing wrong?

<ROW> "Non-Taxable Sales:" </ROW>
<SET name="NonTaxableTotal" type="vbCurrency"> 0 </SET>
<SET name="TATTOO" type="vbString"> "TATTOO" </SET>

<FOR each="ReportDepartment">
<IF>
<CONDITION> Report.Department.Name = TATTOO </CONDITION>
<THEN>
<ROW> Report.Department.Name "|"
Report.Department.Sales </ROW>
<SET name="NonTaxableTotal" type="vbCurrency">
NonTaxableTotal +
Report.Department.Sales </SET>
</THEN>
</IF>
</FOR>

<ROW> "|==============================================|" </ROW>
<ROW> "Total |" NonTaxableTotal </ROW>
 
Ad

Advertisements

G

Glenn Adams [MVP - Retail Mgmt]

unfortunately, the IF-CONDITION construct will not evaluate strings. Best
thing I can suggest is trying the Department ID.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top