BusinessObjects Board

How do I dynamically create report tabs in BO 6.5?

Hi,

I have a report that has tabs for each country eg 1 tab for UK, 1 tab for Ireland, 1 tab for Italy etc. Currently there are about 8 country tabs and then an “other countries” tab that catches all of the countries outside of the main 8. The report was built by having 1 tab with all the countries on it, and then applying a filter to each one to only show the data for that country.

Now here’s the rub, the recipient has asked that I set the report up so that rather than the “other countries” countires being grouped together in one tab, they are split out in to their own separate tabs. I figure I can do this by using a macro that gets a distinct list of countries in the report, then loops through them creating a new tab for each one, based on the “master” tab with the appropriate filter applied.

Any ideas how I can do this? (Ideally I need a hand with the code syntax itself as my BO VBA pretty limited).

Cheers,

Fred


fred_easey (BOB member since 2005-05-10)

Hi Fred,

please have a look here. You can start with this example.


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

Looks almost perfect.

Thanks :smiley:


fred_easey (BOB member since 2005-05-10)

Ok, I changed the variable name my variable name () and stepped through the code. When I get to this bit:

Rpt.Name = Var.Values(boUniqueValues)(i)

…I get this error message:

“A report with that name already exists”

Any ideas what I’m doing wrong :-?


fred_easey (BOB member since 2005-05-10)

Ok think I know what’s wrong, my variable value has a “/” character in it (“Aus/NZ”).

I’ll try and write some code to remove it.


fred_easey (BOB member since 2005-05-10)