BusinessObjects Board

copy a block from a report to an other report

Hello everybody,

I have a document with reports in it and I want to copy a block structure from this document to a new document in it.
I try this but it seems to be not functional (may I have to wait because it takes too much time).
Here is a snippet of my code:

Set Doc = Application.ActiveDocument
Set My_reports = Doc.Reports
Set ReportTest = My_reports.Add
ReportTest.Name = "test"
Set sections = My_reports(1).GeneralSectionStructure
Set sections1 = ReportTest.GeneralSectionStructure
Set sections1 = sections

Does it make sense?


taze (BOB member since 2008-10-17)

No idea???

I just want to know if it is possible to programmatically copy a block from one report to another or from one document to another.
Thanx for your answers.
Taze.


taze (BOB member since 2008-10-17)

You can do this with a template. If you look at this download you’ll see how Dwayne copied content from one document to another document, or even from one report tab to another report tab within the same document.


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

Thank you Dave.
The problem is that the copy concern just the data and not the blocks (tables, cross tables, graphs,cells,…).
My problem is that I want to copy a formatted block (with its colors, fonts, etc…) from a report to a new one.
Thanx…


taze (BOB member since 2008-10-17)

I thought that Dwayne’s macro did that, as I said, by using templates.


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

Thank you Dave,
So it seams that it’s not possible to copy a table,cross-tab or graph from one report to another.
So with BO it is just possible to copy “data” but not “graphical structure”.
If I’m wrong pleae correct me.
Taze.


taze (BOB member since 2008-10-17)

Hi,

As far as I know, it’s not possible to copy data blocks using VBA. Or at least I have not found a way how to do it. And I tried few times. Would love to know if there is a way but I am a bit skeptic that it’s not possible.


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

where are you trying to do it? WebI to WebI doc/reports?

if your answer is Yes then answer is YES, you should be able to…the trick is, you need to navigate on document structure before you can traverse the child/ren under it.

i’m sorry that i might not be able to provide a sample code but i’ve done it on my previous project…you can even thread multiple blocks coming from different documents and save it into a totally new document…in doing that you would also need to create/build the DPs that corresponds to the block/s.

it is probable!

thanks,
bg


bennygene (BOB member since 2005-04-14)

Answer: In fact it’s DesKI to Deski doc/reports.

If it is possible with Deski it will be great!!

And did you save the formating (style,colors,font,…) when you do the copy?

Thanx for your reply…


taze (BOB member since 2008-10-17)

bennygene, if you have the answer can you share it. It will be very useful.
I want to know if deski can do the same thing.
Thanx for your answer!!


taze (BOB member since 2008-10-17)