Please check again. In both of them only first should not print, although there is a possibility that BOTH SECTIONS don’t print (when CompanyInfo.state= “Sales Invoice”.State )…
Raj’s logic is correct - if the states are equal, the condition evaluates to false and doesn’t print the sections. You may want to change the condition to an OR (not sure what logic you want).
To print multiple taxes in a section then you have two options:
Have a integer dataitem and print the relative section
Create multiple variables (three in this case) and assign as required.
May be you need to use array for this and then use COMPRESSARRAY function to avoid space in case of 0 value. Search online help for COMPRESSARRAY, or use different section and then CurrReport.SHOWOUTPUT…