Suppress Subreport in crystal reports -
i want suppress subreport, if 1 of field, used in subreport empty, need formula it, actually, can able suppress subreport based on fields used in main report only, please provide solution it, in advance.
solution 1: 1) create formula in subreport. condition hide/show subreport. on following lines
whileprintingrecords; shared stringvar formulaname:= if (condition) '1' else '0'; // can use true /false
2) on main report create formula
shared stringvar formulaname; formulaname
3) use formula hide subreport or section on main report.
note: important have subreport higher in hierarchy formula in main report calls variable. suggest have "whilereadingrecords;" in both, way ensure evaluate @ same time. also, little debugging help, put "formulaname" @ end of first formula, way can see value is/should be.
solution 2: if not work, create duplicate copy of subreport , place on section above existing subreport , suppress it. use solution 1.
Comments
Post a Comment