For our statement of account I need to compare months to decide which data to show. In the example below, I only want data to show if the months are equal. Here is the code I am using:
<?Date___local_ID669?>
<?for-each:A_R_Statement_Detail_S9?>
<?xdofx:if to_char(Invoice_DueDate_ID67,'MM')
= to_char(Date___local_ID669,'MM')?>
<?Invoice_DueDate_ID67?>
<?Amount_Due___section_ID91?>
<?end for-each?>
It is returning all dates. I thought it might be an issue with the hierarchy, however, when I try and put that into the code, nothing changes.
Here is the portion of the xml I am referencing.
<A_R_Statement_Detail_S9_Group>
<Payor_Level_Header_S14>
<S_T_A_T_E_M_E_N_T___O_F___A_C__ID698>S T A T E M E N T O F A C C O U N T</S_T_A_T_E_M_E_N_T___O_F___A_C__ID698>
<Page__000055_ID705>1</Page__000055_ID705>
<Page__ID706>Page:</Page__ID706>
<APChecksControlField_ID700>52848</APChecksControlField_ID700>
<Statement_Number_ID699>Statement Number</Statement_Number_ID699>
<Remit_To__ID702>Remit To:</Remit_To__ID702>
<Remit_to_Name_ID445>Test Company </Remit_to_Name_ID445>
<RemitToAddressLine1_ID2>1234 TEST STREET</RemitToAddressLine1_ID2>
<RemitToAddressLine2_ID5>CITY STATE 99999</RemitToAddressLine2_ID5>
<Date_ID707>Date</Date_ID707>
<Date___local_ID669>2025-05-30</Date___local_ID669>
<Account_ID708>Account</Account_ID708>
<Account___local_ID670>103356</Account___local_ID670>
<Billing_Address__ID703>Billing Address:</Billing_Address__ID703>
<NameAlpha_ID21>CUSTOMER</NameAlpha_ID21>
<AddressLine1_ID24>ATTN: CUSTOMER</AddressLine1_ID24>
<AddressLine2_ID27>2222 Test Drive</AddressLine2_ID27>
<AddressLine3_ID30>CITY STATE 99999</AddressLine3_ID30>
<EmailAddressow_ID714>testing@gmail.com</EmailAddressow_ID714>
<Currency_Level_Footer_S34>
<Customer_Level_Header_S32>
<A_R_Statement_Detail_S9>
<AN8_LBH_Conditional_S216>
<AddressNumber_ID2>103356</AddressNumber_ID2>
<Description_ID3>CUSTOMER</Description_ID3>
</AN8_LBH_Conditional_S216>
<Doc_Type_Desc_ID69>Invoice</Doc_Type_Desc_ID69>
<Amount_Due___section_ID91>874.77</Amount_Due___section_ID91>
<Document_Number_ID1>159255</Document_Number_ID1>
<DocumentPayItem_ID65>*</DocumentPayItem_ID65>
<Invoice_DueDate_ID67>2025-04-07</Invoice_DueDate_ID67>
<Previous_Amount_Due___Report_ID109>874.77</Previous_Amount_Due___Report_ID109>
</A_R_Statement_Detail_S9>
<A_R_Statement_Detail_S9>
<Doc_Type_Desc_ID69>Recurring Invoice</Doc_Type_Desc_ID69>
<Amount_Due___section_ID91>256.60</Amount_Due___section_ID91>
<Document_Number_ID1>159361</Document_Number_ID1>
<DocumentPayItem_ID65>*</DocumentPayItem_ID65>
<Invoice_DueDate_ID67>2025-04-15</Invoice_DueDate_ID67>
<Previous_Amount_Due___Report_ID109>256.60</Previous_Amount_Due___Report_ID109>
</A_R_Statement_Detail_S9>
<A_R_Statement_Detail_S9>
<Doc_Type_Desc_ID69>Recurring Invoice</Doc_Type_Desc_ID69>
<Amount_Due___section_ID91>1128.75</Amount_Due___section_ID91>
<Document_Number_ID1>159801</Document_Number_ID1>
<DocumentPayItem_ID65>*</DocumentPayItem_ID65>
<Invoice_DueDate_ID67>2025-05-01</Invoice_DueDate_ID67>
<Previous_Amount_Due___Report_ID109>1128.75</Previous_Amount_Due___Report_ID109>