I need help with this XML script
Posted: Tue Feb 08, 2005 5:21 pm
I am trying to modify the following conditional statement from an XML report file:
<FOR each = "ReportTender">
<IF>
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
<THEN>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|(bank deposit)"
</ROW>
</THEN>
<ELSE>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|"
</ROW>
</ELSE>
</IF>
</FOR>
basically what the statement is supposed to say is that for 'reporttender', if the tendertype is equal to 1, then the a row should created that shows the tender.description, followed by the tender.shifttotal, following by the words 'bank deposit' in parentheses. otherwise, if the tendertype is not equal to 1, then a row should be created that shows the tender.description, followed by the tender.shifttotal
first of all, is my syntax correct in the above statement? if not what would need to be changed?
secondly, how can i modify the first part of the condition to check for tenders where the tendertype is equal to either 1 or 2, rather than just 1? the line of code I'm referring to is:
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
How can I change this to test to see if the tendertype is EITHER 1 or 2?
thank you,
kevin
<FOR each = "ReportTender">
<IF>
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
<THEN>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|(bank deposit)"
</ROW>
</THEN>
<ELSE>
<ROW> Report.Tender.Description "|"
Report.Tender.ShiftTotal "|"
</ROW>
</ELSE>
</IF>
</FOR>
basically what the statement is supposed to say is that for 'reporttender', if the tendertype is equal to 1, then the a row should created that shows the tender.description, followed by the tender.shifttotal, following by the words 'bank deposit' in parentheses. otherwise, if the tendertype is not equal to 1, then a row should be created that shows the tender.description, followed by the tender.shifttotal
first of all, is my syntax correct in the above statement? if not what would need to be changed?
secondly, how can i modify the first part of the condition to check for tenders where the tendertype is equal to either 1 or 2, rather than just 1? the line of code I'm referring to is:
<CONDITION> Report.Tender.TenderType = 1</CONDITION>
How can I change this to test to see if the tendertype is EITHER 1 or 2?
thank you,
kevin