Re: Export-import SRB report
Ocke Janssen <[email protected]> Thu, 14 Jan 2010 07:36:51 +0100
| Newsgroups | gmane.comp.openoffice.dba.user |
|---|---|
| Organization | Sun Microsystems GmbH |
| Message-ID | <[email protected]> |
Sergio Corato wrote:
> Ocke Janssen ha scritto:
>> Hi Sergio,
>>
>> I would prefer 3 :-) insert the reportdefinition from db1 into db2.
>> Please have a look at
>>
>> http://svn.services.openoffice.org/opengrok/xref/Current%20(trunk)/dbaccess/source/ui/misc/UITools.cxx#1816
>>
>>
>> - get the report definition from the getReportDocuments() from the
>> database doc of db1
>> - create a new instance of report defintions from db2 with the report
>> as argument (see code)
>> - insert new created instance into db2 report documents
>>
>>
>> - oj
>>
> Well, it's not very clear to me ;-) (OOoBasic and some Python user),
> something like Turkish, but it's a good point to start!
Below I inserted some code which I only translated into Basic (which
won't compile I guess :-)
>
> Is the report definition:
> oDb = oContext.getByName(HIDB)
> oDatabase = oDb.DatabaseDocument
> oReportDefinition = oDatabase.getReportDocuments.getByName("Rapporto1")
oDb2 = oContext.getByName(HIDB_2)
oDatabase2 = oDb.DatabaseDocument
args(0).Name = "Name"
args(0).Value = "NewName"
args(1).Name = "Parent"
args(1).Value = nul
args(2).Name = "EmbeddedObject"
args(2).Value = oReportDefintion
newDef =
oDatabase.getReportDocuments.createInstanceWithArguments("com.sun.star.sdb.DocumentDefinition",args)
oDatabase.getReportDocuments.insertByName("newName",newDef)
- oj
> .getComponent.Detail.ReportDefinition
> ?
>
> Thx
> Sergio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
Ocke Janssen Tel: +49 40 23646 661, x66661
Dipl. Inf(FH) Fax: +49 40 23646 550
Sun Microsystems Inc.
Nagelsweg 55 mailto:[email protected]
D-20097 Hamburg http://www.sun.com/staroffice
Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schr?der, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering