AW: O$8.1 Copying class to another library

Rudolf Bargholz rudolf at bargholz.ch
Tue Nov 26 04:06:09 EST 2019


Hi Mike,

As others have mentioned, you can copy the $classdata of a report.

Do lGlobalLibRef.$classes.$findname(lRow.REPRP_CLASSNAME) Returns lGlobalClassRef
If isnull(lGlobalClassRef)
  Do $libs.ONLINE_GLOBAL.$classes.$add(kReport,lRow.REPRP_CLASSNAME) Returns lGlobalClassRef
End If
Calculate lGlobalClassRef.$classdata as lBinary
Save class {ONLINE_GLOBAL.[lRow.REPRP_CLASSNAME]}

We had to add the «Save class» as there were strange cases that occurred where classes were not being saved.

What you also need to remember is that your destination library needs to have the same #WIRFONTS and #STYLES as the source library, so we automatically copy the classes from the source library to the destination library.

Another point to keep in mind is, the $classdata does not contain the other notation values in the class. If you have, for example, entered a value for $desc of the source report, you will need to assign the $desc of the source to the destination report when copying. You will need to decide which notations you want to copy in addition to the $classdata.

Regards

Rudolf Bargholz

Von: Mike Rowan<mailto:michael.rowan3 at gmail.com>
Gesendet: Montag, 25. November 2019 22:57
An: OmnisDev List - English<mailto:omnisdev-en at lists.omnis-dev.com>
Betreff: O$8.1 Copying class to another library

Hello everyone,

Can anyone give me a clue on copying a report class from Lib A to Lib B?

I'm sure it's dead easy.  Thanks for all offers.
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com

Hello everyone,

Can anyone give me a clue on copying a report class from Lib A to Lib B?

I'm sure it's dead easy.  Thanks for all offers.
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com



More information about the omnisdev-en mailing list