Load page setup (Highjacked EurOmnis 2014)
Michael Rowan
michael.rowan3 at gmail.com
Tue Aug 26 10:00:30 EDT 2014
Sorry, I am still lost in the woods on this.
>From my main library I want to modify and then permanently save a report
class $pagesetupdata in another library dummylib.
Set report name $libs.dummylib.$reports.[iDummyName]
Load page setup
Prompt for page setup
If flag true
Do
$libs.dummylib.$reports.[iDummyName].$pagesetupdata.$assign($root.$prefs.$pagesetupdata)
Returns %R
If not(%R)
Breakpoint
End If
End If
;;At this point any changes to the page setup are visible in the
properties/pagesetup data and get used in printing. Very nice.
;;Now, here the remaining problem. Saving the changes.
Yes/No message (Sound bell) {SAVE the page setup changes?}
If ktrue
Save class {$root.$libs.dummylib.$classes.[iDummyName]}
OK message [#F] ;; says True, but its not|
End If
If I now CLOSE the library dummylib and reopen it, the page setup for the
report class is back to its original settings.
The library dummylib is set to $ignoreexternal=kTrue, and the dummy report
classes are set to $external=kTrue
Mystified.
Mike
On Fri, Aug 22, 2014 at 9:35 PM, Michael Monschau <michael at brainydata.co.uk>
wrote:
> Hi Rudolf,
>
> I don't think that is how you would use it.
> You may store the binary in a local or shared DB containing page setup
> data. So you may do
>
> Do MySmartList.$add(PageSetupDataName,Platform,$root.$prefs.$pagesetupdata)
> Do MySmartList.$dowork()
>
> later on you can do
>
> Do $root.$prefs.$pagesetupdata.$assign( MySmartList.C3 )
>
> Disclaimer: I have not tested the above but it should work.
>
> Regards,
> Michael
>
> Michael Monschau (Director)
> Brainy Data Limited
>
> Reply To: michael at brainydata.co.uk
> Phone: +44 (0)870 474 0708
> Web: www.brainydata.co.uk the home of Omnis Components and Developer
> Services
>
>
>
>
>
>
> On 22 Aug 2014, at 07:40, Rudolf Bargholz wrote:
>
> > Hi Michael,
> >
> > We stayed with dummy reports as we were never really certain what would
> happen in a multi-user environment when many users on different machines
> with different page setups would assign pagesetupdata to a single report
> class:
> >
> > Calculate $clib.$reports.MyReport.$pagesetupdata as
> $root.$prefs.$pagesetupdata
> >
> > Note the "$reports".
> >
> > What would happen if two users with different page setups printed in
> quick succession, each setting their own pagesetupdata to the same report
> class. Perhaps the caching of the classes in memory that Omnis performs to
> speed up working with the libraries would alleviate this type of problem,
> but as I never really was sure, we stayed with the dummy report mechanism
> where each user/print group have their own library with dummy reports that
> are used for page setup purposes.
> >
> > Regards
> >
> > Rudolf
> >
> > -----Ursprüngliche Nachricht-----
> > Von: omnisdev-en-bounces at lists.omnis-dev.com [mailto:
> omnisdev-en-bounces at lists.omnis-dev.com] Im Auftrag von Michael Monschau
> > Gesendet: Freitag, 22. August 2014 08:19
> > An: OmnisDev List - English
> > Betreff: Re: Load page setup (Highjacked EurOmnis 2014)
> >
> > Hi $all,
> >
> > The Studio page setup notation can help you to store and retrieve page
> setup data without the use of dummy reports. The notation
> $root.$prefs.$pagesetupdata returns the page setup data (which contains a
> mixture of cross platform and platform/printer specific information, the
> same data as is stored in your reports) as binary data. That binary data
> can be later assigned back to $pagesetupdata.
> >
> > For anyone who is interested, I will be covering this and other useful
> notation chicanery in my notation class at EurOmnis 2014.
> >
> > Regards,
> > Michael
> >
> > Michael Monschau (Director)
> > Brainy Data Limited
> >
> > Reply To: michael at brainydata.co.uk
> > Phone: +44 (0)870 474 0708
> > Web: www.brainydata.co.uk the home of Omnis Components and Developer
> Services
> >
> >
> >
> >
> >
> >
> > On 22 Aug 2014, at 06:35, Rudolf Bargholz wrote:
> >
> >> Hi Michael,
> >>
> >> Is the report class set to $external=kTrue?
> >>
> >> Set report name ONLINE_LOCAL.[ReportClassName] Load page setup
> >>
> >> is what we also use.
> >>
> >> Regards
> >>
> >> Rudolf
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: omnisdev-en-bounces at lists.omnis-dev.com
> >> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] Im Auftrag von
> >> Michael Rowan
> >> Gesendet: Freitag, 22. August 2014 07:32
> >> An: OmnisDev List - English
> >> Betreff: Re: Load page setup
> >>
> >> Hi Reg
> >>
> >> No, that results in "Unable to find class dummyreportname"
> >>
> >> If I do:
> >> Set report name invoice ;; OK but invoice is a class in the main code
> >> libarary
> >>
> >> If I do:
> >> Set report name dummyinvoice ;; not OK and dummyinvoice is a class in
> the reports library.
> >>
> >> Must be something to having two libraries, but darned if I know what.
> >>
> >> Cheers
> >>
> >> Mike
> >>
> >>
> >> On Fri, Aug 22, 2014 at 1:52 PM, Reg Paling <reg.paling at lokanet.com>
> wrote:
> >>
> >>> Hi MIke,
> >>>
> >>> Try this:
> >>>
> >>> Set report name dummyreports.[iDummyreportName]
> >>>
> >>> Cheers,
> >>> Reg
> >>>
> >>>
> >>>
> >>> On 22/08/2014 2:13 pm, Michael Rowan wrote:
> >>>
> >>>> Hi Michael and Rudolf
> >>>>
> >>>> I have hit a small problem. I have two libraries, one for my code
> >>>> and the other for a set of dummy reports. (The dummy reports
> >>>> library stays with the workstation unchanged after a code update.)
> >>>>
> >>>> iDummyreportName is a variable containing the required dummy report
> >>>> class name.
> >>>>
> >>>> This works:
> >>>> Do $libs.dummyreports.$reports.$makelist($ref.$name) ;;returns a
> >>>> list of the available report classes as expected. It includes the
> >>>> expected report class.
> >>>>
> >>>> Following that, this does not work:
> >>>> Set report name $root.$libs.dummyreports.$reports.[iDummyreportName]
> >>>> If flag false
> >>>> ;despite the value in iDummyreportName being a valid name else
> >>>> ;I would be happy
> >>>> end if
> >>>>
> >>>> Why would the report name refuse to be set? This is all done within
> >>>> the code library. Should I switch the current library?
> >>>>
> >>>> Regards
> >>>>
> >>>> Mike
> >>>>
> >>>>
> >>>> On Thu, Aug 21, 2014 at 1:46 AM, Rudolf Bargholz
> >>>> <rudolf at bargholz.ch>
> >>>> wrote:
> >>>>
> >>>> Hi Mike,
> >>>>>
> >>>>> There is a modify report external object available in the Studio
> >>>>> component store. If you place this in a window, assign the
> >>>>> $classname of the modify report object to your report, you can do
> the following:
> >>>>>
> >>>>> Calculate lClassName as MYLIB.rMyReport Do
> >>>>> $cinst.$objs.dummy.$classname.$assign(lClassName)
> >>>>> Do $cinst.$objs.dummy.$pagesetup()
> >>>>>
> >>>>> where $cinst.$objs.dummy is the reference to the modify report
> >>>>> object in your window.
> >>>>>
> >>>>> This will open a page setup dialog for your specified report. If
> >>>>> you press OK/YES in the dialog, the associated report will be
> >>>>> updated and the page setup chosen will be stored in the report.
> >>>>>
> >>>>> Michael's method is just as valid. The above method however allows
> >>>>> you to actually view the report you want to assign the page setup
> to. Beware:
> >>>>> all
> >>>>> changes made in the modify report object change the live class
> >>>>> immediately, even deleting fields in the report.
> >>>>>
> >>>>> Regards
> >>>>>
> >>>>> Rudolf
> >>>>>
> >>>>> -----Ursprüngliche Nachricht-----
> >>>>> Von: omnisdev-en-bounces at lists.omnis-dev.com [mailto:
> >>>>> omnisdev-en-bounces at lists.omnis-dev.com] Im Auftrag von Michael
> >>>>> Rowan
> >>>>> Gesendet: Mittwoch, 20. August 2014 14:04
> >>>>> An: OmnisDev List - English
> >>>>> Betreff: Load page setup
> >>>>>
> >>>>> Hi all
> >>>>>
> >>>>> As I understand things for Studio 4.3.2 on OSX 10.6.8 if I do:
> >>>>>
> >>>>> Set report name [myreport]
> >>>>> Load page setup
> >>>>>
> >>>>> all future reports (in the absence of further intervention) will
> >>>>> use that page setup.
> >>>>>
> >>>>> But how do I transfer a page setup INTO a report:
> >>>>>
> >>>>> Set report name [myreport]
> >>>>>
> >>>>> Prompt for page setup
> >>>>> If Flag True ;; the page setup is whatever the user chose here.
> >>>>>
> >>>>> Now I want to store THAT in [myreport] so I can re-use it later.
> >>>>>
> >>>>> Should this work? Doesn't appear to.
> >>>>>
> >>>>> Thanks for any ideas.
> >>>>>
> >>>>> Mike
> >>>>> _____________________________________________________________
> >>>>> Manage your list subscriptions at http://lists.omnis-dev.com
> >>>>>
> >>>>> _____________________________________________________________
> >>>>> Manage your list subscriptions at http://lists.omnis-dev.com
> >>>>>
> >>>>>
> >>>>> _____________________________________________________________
> >>>> Manage your list subscriptions at http://lists.omnis-dev.com
> >>>>
> >>>
> >>> _____________________________________________________________
> >>> Manage your list subscriptions at http://lists.omnis-dev.com
> >>>
> >> _____________________________________________________________
> >> Manage your list subscriptions at http://lists.omnis-dev.com
> >> _____________________________________________________________
> >> Manage your list subscriptions at http://lists.omnis-dev.com
> >
> > _____________________________________________________________
> > Manage your list subscriptions at http://lists.omnis-dev.com
> > _____________________________________________________________
> > Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
More information about the omnisdev-en
mailing list