How hide column in the report on different pages EXCEL?

0

Hi,

I need hide column in the report on different pages EXCEL.
if typeReport==1 then, a need to show column3 (hide column4)
if typeReport==2 then, a need to show column4 (hide column3)
Print When Expression on column is not work, because I not see field typeReport.
Print When Expression on Cell work, but this decision not hide column, it only make column blank

I made group typeReportGroup with option isReprintHeaderOnEachPage and option isStartNewPage
        <group name="typeReportGroup" isStartNewPage="true" isReprintHeaderOnEachPage="true">
            <groupExpression><![CDATA[$F{typeReport}]]></groupExpression>
        </group>

How correct hide column?

Thanks!

JRXML example file attached
Input example parameter tableData:

[{typeReport: "1", column1: "Name 1", column2: "1", column3:"111", column4:"01.01.2022"}, {typeReport: "2", column1: "Name 2", column2: "2", column3:"222", column4:"02.01.2022"}, {typeReport: "1", column1: "Name 3", column2: "3", column3:"333", column4:"03.01.2022"}]

Attachments: 
nnikolay86's picture
Joined: Dec 5 2021 - 6:14pm
Last seen: 18 hours 1 min ago

0 Answers:

No answers yet
Feedback