Load page setup (Highjacked EurOmnis 2014)

Michael Monschau michael at brainydata.co.uk
Fri Aug 22 02:19:24 EDT 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




More information about the omnisdev-en mailing list