Hide report columns?

Startbeitrag von Garry Allen am 30.09.2017 14:55

Assuming it it possible, what is the easiest way to accomplish this inWinDev20?
Thanks,
Garry

Antworten:

Hello Garry

It could be as simple as making the body cells invisible and replacing the column heading fields with blanks, but obviously that leaves gaps.
The report structure is essentially a header, body and footer.
You can use alternate blocks to change the header and footer and use an iteration block to change the body content.

Regards
Al

von Al - am 30.09.2017 21:52
Hi Gary,

properties like ..Width, .. Caption, ..Visible are also working in reports

So you can show/hide them in code (i.e.e opening of the report) according to you needs. You have to resize/hide the table-header-control (static) and the table-body-control (item) and maybe even a report-total-control.

Note that if you hide the 4th report-column. Then you also have to reposition the 5th, 6th and so on. These go to the left modifying the X-property with the same amount (column4..width).

von Arie - am 01.10.2017 09:14
The original report was made easily with the report generator and looks like this:
Tour # Company Rest1 Rest2 Rest3 Rest4
xxxxx xxxxxxx 45 31 11 42
...
Totals 120 80 45 62

If they wanted the report to just show Rest3 I was hoping I could just move column 5 to column 3 and hide the rest but maybe I should look at manually programming the report?
Garry

von Garry Allen - am 01.10.2017 13:59
Gary,

Afaik the TableMoveColumn() function does not work for reports. Just tried that and the IDE gives an error right away, it will not let us use the report-table-control.

von Arie - am 01.10.2017 15:57
Hi Garry,

a general solution would be to first build a temporary file with the report columns as fields, You fill the fields according to the users selection. The report itself is based on this temp file and you just hide the unused columns starting from the right side.

regards, Heinz

von heinz kuebler - am 02.10.2017 09:13
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.