BusinessObjects Board

Auto Create Report tabs according to Values

Dear Sir,

I created a sales report in one tab with Brands , its working fine,

My Question is,

Is there any way that report will auto generate new tabs according to Brands

and give their corresponding sales figures. ?

                I mean every new brand on new tab

Thanks,


ArunJAI (BOB member since 2008-12-28)

Possible, but only with VBA. The bigger question is why? Section the report on brand, and set to start each section on a new page. Anything printed, viewed in page mode, sent to pdf, etc. will look exactly the same.


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

thanks a lot Sir,

Let me try it

:smiley:


ArunJAI (BOB member since 2008-12-28)

i tried sir,

my requirement is that all the sections should come in new excel sheets

Thanks,


ArunJAI (BOB member since 2008-12-28)

Hi,

Now you can get exactly what you are looking, This code was created by Dwayne Hoffpauir, EDS
[Create report tab and filter for each value
][/url]

Just change the resort name to your section Object.

[Private Sub Document_AfterRefresh()

Dim Rpt As Report 
Dim Var As DocumentVariable 
Dim i As Long 

Set Var = ThisDocument.DocumentVariables("Resort") 
If UBound(Var.Values(boUniqueValues)) > 0 Then 
    Set Rpt = ThisDocument.Reports(1) 
    For i = 1 To UBound(Var.Values(boUniqueValues)) 
        Set Rpt = Rpt.Duplicate 
        Call Rpt.AddComplexFilter("Resort", "= <Resort> = """ &amp; _ 
            Var.Values(boUniqueValues)(i) &amp; """") 
        Rpt.Name = Var.Values(boUniqueValues)(i) 
    Next i 
    Call ThisDocument.Reports(1).Delete 
End If 

End Sub][/code]


Yusuf_BOXI :us: (BOB member since 2007-12-05)