I have been working with custom variables, but while using them in the data bands, I have encountered some issues.
These variables refer to information found within the XML assigned to these data bands. For example, I have a variable called "xDescPro", whose value refers to "IIF(Trim(cab.txt_ing) == 'true', Trim(pfr.desc_prod2), Trim(pfr.desc_prod))", with "pfr" being each of the records in my XML.
This is done because these custom variables are used in other fields of the data band, such as the custom variable "xDescrip" whose value is: "IIF( !string.IsNullOrEmpty(Trim(IIF(cab.txt_ing == 'true', pfr.desc2, pfr.desc1))), IIF( !string.IsNullOrEmpty(xDescPro), '', '' ) + Trim(IIF(cab.txt_ing == 'true', pfr.desc2, pfr.desc1)), '' ) ". As you can see in the "xDescrip" variable, it internally uses the "xDescPro" variable.
The problem is that these variables take the value of the first record in my data and do not update automatically. That is, as seen in the provided example, when using the "xDescPro" variable, it assigns the resulting value of my first record in my XML, "55", instead of taking the corresponding value for each of the records, expecting "Other value" for the second record, but as seen in the example, it uses "55".
Is there a way to handle this using custom variables within the data band?
Other problem that I dont know how to solve with the Header band, is there a way to enable a textbox if at least one of the records in my data has information, for example, in my header I use something like:
Code: Select all
{(decimal)dat.dctos == 0 && dat.conmed == "0" && IsNullOrEmpty(Trim(pfr.cve_prodk))}
Thanks