That yeilds the same result as before, I get the D0, D1 and Message D2 information to print, but the Detail D2 information does not.
Maybe if I give you some background on the layout it will help:
Most of the information is in a Group Header section that is grouped on a Meter # field found in the D1 section. The information in the section includes fields from the D0, D1 and Detail D2 (DTLCODE=D) sections.
Details A section contains fields from Detail D2 sections.
Details B section contains a formula that totals an amount field in the Detail D2 sections.
Details C section contains the messages from the Message D2 (DTLCODE=M) sections.
{@PERR} would be 'Y' if the customer only wants to print accounts/meters that have an Error or Warning associated with it. The errors and warnings are stored in the Message D2.
{@PERR} would be 'N' if the customer wants to print all accounts/meters regardless of if they have any errors/warnings or not.
I thought that if there was a field located in the D0 in the XML that was a Y if the account/meter had a message associated with it and a N if it didn't, it would be SOOOOOO easy and the formula would be:
and
{XMLNAME.D0_MESSAGECODE}='Y'
or
and
{XMLNAME.D0_MESSAGECODE}={XMLNAME.D0_MESSAGECODE}
But the programmer has informed me that the messages are not created until after the D1 is evaluated, so there can be no field without creating extreme amounts of work for the programmer.
I'm still wondering about this though and am keeping it on the back burner incase all else fails.
Sorry if it is a bit confusing, I am not the most eloquent of speakers.