I have a problem with report writting that I need some help. I am trying to create a document with two tabs. Their table formats and conditions are the very similar except one of the conditons and two objects within the table. I had already finished table format on the first tab. I would like to duplicate and modify the condition and objects for the second tab but unable to do so using Duplicate Report function.
I researched this topic in the forum and found that I could download an add-in to duplicate Data Provider. However, I am just wondering if this add-in will also duplicate the table format that I have already done using the data provider.
I believe that the add-in (available for download in the Library area of the Integra Solutions web link in my sig) gives you the option to duplicate the formatting. It is not an automatic thing, but you can make that choice. It does that function by saving the original report as a template, duplicating the data provider to a new report (or a completely new document if desired), then applying a template to the new report.
I have found that the template application can be “problematic”. If it fails, you can do the same series of steps yourself. The hard part - duplicating the actual data provider - works very well as written.
May I add to Dave’s reaction that the add-in works for document with ONE dataprovider. If you have a document with 2 data-providers, adding a third dataproviders using the add-in fails. (This occured to me , since very few of my BO documents contain 1 dataprovider, most of them have 2 or more)
Hmmmm. Are you sure that is why it fails ? Maybe the query you were trying to copy was too complex. It has problems copying queries with subqueries or unions. I don’t think I’ve ever hit a limit related to the number of queries in the source or destination document.
The problem is with more complex queries , which gives a VBA run-time error about invalid index.
While we’re at the subject of add-in’s:
The add-in which should give a nice data-dictionary (also from integra library) fails to give a complete list of variables with multi data-providers/ multi report documents. I failed to contact the creator of the add-in, so I do not know if is a generic issue Anyone?[/quote][/list]
There is currently no method that can be used to access (duplicate) queries with sub-queries, or data providers that use the combined query option. Is that what you are trying to do? I’ve duplicated dp’s from documents with more than one data provider before.
I have an alternate option that needs to be posted on our web site. I scans all documents in a specified folder and generates an output list of objects used in the document. One of our other consultants has another one that includes variables. So there are other options floating around, we just need to get them posted.
Dave, I have written a “copy data provider” add-in that handles combined (union, intersect, minus) queries and also copies multiple data providers in one step. I wrote it from scratch using the SDK documentation (as a learning experience and to get a useful utility). Of course I later found out it wasn’t such an original idea (similar utilities were on your site and on the BusObj site), but then few ideas are truly original, right!
I think it covers just about all of what is available in the object model regarding data providers. There were a few of the more esoteric properties (IsRefreshable, IsEditable) that were problematic when I developed it, so maybe I’ll go look at those again, along with sub-queries (haven’t tried that). If there is interest, I’d be glad to share the utility after that.
I am VERY interested in a utility that does what you describe, cause it would make life so much easier. (Every report beyond standard stuff is produced by me and distributed to key-users)
I’ll take anything you want to share if it can handle multiple dataproviders and union queries… (not using subqueries anyway)
If you want to send a copy to “Bob” at busobj@forumtopics.com we’ll get it posted here in the code samples area. We can also make the add-in available for download.
OK, I sent the add-in to BOB for posting here. In the meantime, here is the ReadMe file:
If someone is in a real hurry (been there myself), send an email to me (address above) and I’ll forward a copy to you. As always, feedback (bug reports :? or otherwise) is appreciated. Hopefully you will find it useful.
I sent it to busobj@forumtopics.com per Dave’s request. Probably hasn’t had time to post it here yet. I sent a copy to your email address in the meantime.