BusinessObjects Board

How to write a macro to delete zero rows of two columns!!

I have a report and I want to write a macro for deleting zero rows of two columns.And if shouln’t be like if zero in one column and some value in the other then it should display both the columns.Delete only if both the columns hav zero’s.


DataGenius (BOB member since 2006-06-13)

Hi,

Can’t you create a condition in the query panel that would limit the data that are fetched into the report?

And if you can’t and the 0s are already in the report why can’t you use a filter to filter out from a data block the rows that you don’t need them?


Marek Chladny :slovakia: (BOB member since 2003-11-27)

actually the qury is not so simple.The only solution is do it by using macro.I need a macro.Please write me the code for macro for this.


DataGenius (BOB member since 2006-06-13)

You can’t really delete or even edit rows via a macro. The data is not exposed at that level.

There are options for building complex filters that can check more than one column… meaning it’s more than just a simple “picklist” of values. That’s probably the route you need to go.


Dave Rathbun :us: (BOB member since 2002-06-06)

I am not sure whether I understand correctly what you want.

Using macro you can set a filter on a data block to hide some rows. Some examples of such macro can be found in DK (VBA/ASP/JSP) section of BOB.

However, macro can not be used to delete records from a data provider. This is not possible.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Can u send me code how to hide those rows of the columns.Or can u write me a macro that can be used in excel.


DataGenius (BOB member since 2006-06-13)

Have you tried search in SDK (VBA/ASP/JSP) subforum? :wink:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

yeah I tried but unfortunately didn’t find one over there.I believe it is not the complex one.


DataGenius (BOB member since 2006-06-13)

Here is an example how to add a complex filter:


Marek Chladny :slovakia: (BOB member since 2003-11-27)