Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Ronan Masangcay
  Where is Ronan Masangcay?
 Manila
 Philippines
 Ronan Masangcay
 Tags
Subject: RE: report events (multiple details)
Thread ID: 153261 Message ID: 154689 # Views: 1 # Ratings: 1
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Tuesday, December 18, 2007 8:25:54 PM         
   


> > Then you need to create two report cursors and then create a relationship between them:
> >
> >
> > SELECT ... FROM MyTable INTO CURSOR RptCursor1
> > INDEX ON PKField TAG PKField
> > SET ORDER TO TAG PKField
> > SELECT ... FROM MyOtherTable INTO CURSOR RptCursor2
> > SET Relation to RptCursor.FKField INTO RptCursor2
> > 

> >
> > Now you only have two tables to deal with. Still a fairly simple report.
> >
> > Ken
> > You shall know the truth - and the truth shall set you free. (John 8:33)
>
> Hi Ken,
>
> Just an update, I can't get it to work using this approach.
> This is what i did in the command prompt
>
>
USE currctclientmaster SHARED IN 0
> USE c:\slimagents\dbfs\currctskills.dbf SHARED IN 0
> USE c:\slimagents\dbfs\currct_wh2.dbf SHARED IN 0
> SELECT currctskills
> SET ORDER TO ACCTNO   && ACCTNO
> SELECT currct_wh2
> SET ORDER TO ACCTNO   && ACCTNO
> SELECT currctclientmaster
> SET ORDER TO ACCTNO   && ACCTNO
> 

>
>
>
SELECT currctclientmaster
> SET ORDER TO ACCTNO   && ACCTNO
> SET RELATION TO acctno INTO currctskills
> SET RELATION TO acctno INTO currct_wh2
> REPORT FORM km NOCONSOLE ENVIRONMENT preview

>
> This generates an error "currctskills is not related to the current work area."
>
> When I try this OTOH,
>
>
SELECT currctclientmaster
> SET ORDER TO ACCTNO   && ACCTNO
> SET RELATION TO acctno INTO currct_wh2
> SET RELATION TO acctno INTO currctskills
> REPORT FORM km NOCONSOLE ENVIRONMENT preview

>
> This generates an error "currct_wh2 is not related to the current work area." it seems to forget the previous relation, why?
>
> More info; in the init of the report i placed this code because i couldnt change the values in the properties of the DE
>
>
this.InitialSelectedAlias=[currctclientmaster]

>
> Thanks for your time and help.
>
> Ronan
>
> Iron Sharpens Iron

Ronan,

Your second SET RELATION command cancels the first. Use a single SET RELATION command (as Ruel suggests) or check out the ADDITIVE keyword in the help file. This allows you to add relationships, one command after another.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

report events (multiple details) Posted by Ronan Masangcay @ 12/4/2007 3:52:20 AM
RE: report events (multiple details) Posted by Ronan Masangcay @ 12/4/2007 4:32:46 AM
RE: report events (multiple details) Posted by Ken Murphy @ 12/4/2007 4:42:52 AM
RE: report events (multiple details) Posted by Ronan Masangcay @ 12/4/2007 6:04:52 AM
RE: report events (multiple details) Posted by Ken Murphy @ 12/4/2007 1:42:15 PM
RE: report events (multiple details) Posted by Ronan Masangcay @ 12/18/2007 2:41:49 PM
RE: report events (multiple details) Posted by ruel parayno @ 12/18/2007 3:11:25 PM
RE: report events (multiple details) Posted by Ronan Masangcay @ 12/18/2007 4:22:56 PM
RE: report events (multiple details) Posted by Ken Murphy @ 12/18/2007 8:25:54 PM
RE: report events (multiple details) Posted by Ronan Masangcay @ 12/19/2007 1:44:24 AM
RE: report events (multiple details) Posted by Ken Murphy @ 12/19/2007 2:31:59 PM