Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: Form's DE 2 Report
Thread ID: 143325 Message ID: 143351 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Tuesday, August 28, 2007 6:52:34 AM         
   


> >
> > Ilya
> >
> >
> > You can get the Datasession of the form with SET("Datasession") and assign it to a PRIVATE variable, which the report will see,
> >
> > and in the BeforeOpenTables or Init of the report you can SET DATASESSION TO MyPrivateVariable - the variable so that the report will use the same datasession and will have access to all the tables, views etc.
> >
> >
> > Bernard
> >
> > ** If you see someone without a smile, give em one of yours :) **
>
> Bernard,
>
> thank you for reply, but - could you, please, elaborate a bit here?
> For instance: is that form's Data Session's handle created and accessible in the run-time only (that is - it is, per my (uneducated (:<) ) perception)? If so - how do I access those cursors for selecting fields for report for visual design, if that report s./b. open in (visual) Report Designer? Is it possible?
>
> Thanks!
>
> Regards,
>
> Ilya

Actually Barbara has given a better explanation. So I will elaborate on that.

Your form has a Private Datasession (2). If you call the report from the form - say by adding code to a button.click:

Report Form MyReport NoCONSOLE Preview


now the report will have access to ALL the tables/views of the form - provided you have not made the Datasession of the Report as Private.

From your message above I think you are talking about designing the report at runtime. If you issue

MODI REPORT MyReport


from the form then the same as above is the case.


Your problem is solved.


Bernard

** If you see someone without a smile, give em one of yours :) **

ENTIRE THREAD

Form's DE 2 Report Posted by Ilya Rabyy @ 8/27/2007 9:59:56 PM
RE: Form's DE 2 Report Posted by Tamar Granor @ 8/27/2007 10:49:06 PM
RE: Form's DE 2 Report Posted by Ilya Rabyy @ 8/27/2007 11:38:56 PM
RE: Form's DE 2 Report Posted by Yull67 @ 8/28/2007 8:10:34 AM
RE: Form's DE 2 Report Posted by Bernard Bout @ 8/27/2007 11:34:21 PM
RE: Form's DE 2 Report Posted by Ilya Rabyy @ 8/27/2007 11:51:16 PM
RE: Form's DE 2 Report Posted by Bernard Bout @ 8/28/2007 6:52:34 AM
RE: Form's DE 2 Report Posted by Rick Schummer @ 8/28/2007 3:35:09 AM
RE: Form's DE 2 Report Posted by Ilya Rabyy @ 8/28/2007 4:49:47 PM
RE: Form's DE 2 Report Posted by Barbara Peisch @ 8/28/2007 3:53:38 AM
RE: Form's DE 2 Report Posted by Ken Murphy @ 8/28/2007 5:34:46 AM
RE: Form's DE 2 Report Posted by Ilya Rabyy @ 8/28/2007 4:59:07 PM
RE: Form's DE 2 Report Posted by Ken Murphy @ 8/28/2007 5:04:14 PM