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


> > Colleagues,
> >
> > Forgive me if my Q's look stupid - after all, I've been working with Fox since 1990 - but I've never implemented Data Environment to/for/whatever before. Here's what I have:
> >
> > 1. A form with whole bunch of controls, mostly TextBoxes but some are ComboBoxes.
> > 2. Data Environment with bunch of database's views and (my guess) added-on cursors/views (hand-made - my guess again).
> > 3. Some fields in those permanent (DB-stored) and runtime (DS-stored) cursors/views are the data/control/row-sources for those Text/Combo boxes in p. 1.
> > 4. The form's data session is set to 2 - Private Data Session.
> >
> > Now, I need to make report (FRX) and include all those fields and lists into that report. And I looked up "How to: Load Data Environments for Reports" topic in VFP's Help - and it ain't no help coz I've got no class neither other similar report, just this form (SCX).
> >
> > Is there any trick to load this form's data environment into a report and select fields from this DE for placing them - visual design - at the report's page in the VFP's Report Designer?
> >
> > If it was just one table or cursor (OK, two) - would be no-brainer for me, "been there, done that" already. But dealing with DE and a bunch of those private views in private DS is new to me.
> >
> > AHWBGA!
> >
> > Regards,
> >
> > Ilya
>
> 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

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