How to delete a column from a table in report via SDK?

I’m looking for an example of VBA code to delete of a column in a table.
Explanations :
In a report, I have a table with 3 columns (, , ).

I want to delete the column via VBA on some condition, and let the and only to remain in table.

** :!: IMP: I do not want to hide the column as the formula applied on will not reflect any change in this case.

Thank you for your help. :slight_smile:


sukkhi :de: (BOB member since 2004-06-25)

Not possible. The object model exposes very, VERY little regarding table structures. You can basically review the information that appears on the Pivot tab of the Format, Table dialog box … read only.

The alternative is to create two versions of the table … one with and one without. “Stack” the two tables one on top of the other, and use the “Hide Block” feature (Appearance tab) to display only the desired table. Base the hide on a formula, and use VBA to change that formula.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thanks Dwayne,

Your idea of hiding tables has opend up a lot of new aspects to handle. Now I can throw required BO environment variables and use their values in if …then…else conditions and in a lot of other calculation in any report.

Cheers,


sukkhi :de: (BOB member since 2004-06-25)

Excellent … BOB at its best!


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)