Data Report Designer and SHAPE command
From: Tim (tim_at_mail.com)
Date: 12/30/04
- Next message: Rob Charlton Jr.: "RE: solution!!!!!!!!!!!!!!!!!!!!"
- Previous message: sheryl: "Network user count question"
- Next in thread: Tim: "Re: Data Report Designer and SHAPE command"
- Reply: Tim: "Re: Data Report Designer and SHAPE command"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Dec 2004 16:49:16 -0600
I am creating a DataReport using the Data Report Designer (VB6) and using
the following SHAPE command to create a hierarchical recordset of
Client/FoodService records:
mstrSQL = "SHAPE {SELECT * FROM Client} AS Client " & _
"APPEND ({SELECT FoodService.FoodServiceID, " & _
"FoodService.ClientID, " & _
"FoodService.FoodServiceDate, " & _
"FoodServiceTypes.FoodServiceTypeDescription,
" & _
"FoodService.NumberOfBags, " & _
"FoodService.Comments FROM
FoodService " & _
"LEFT JOIN FoodServiceTypes ON
FoodService.FoodServiceTypeID=FoodServiceTypes.FoodServiceTypeID " & _
"WHERE FoodService.FoodServiceDate Between
#" & mstrStartDate & "# And #" & mstrEndDate & "# " & _
"ORDER BY FoodService.FoodServiceDate} AS
FoodService " & _
"RELATE ClientID TO ClientID) AS FoodService"
Currently, the report prints every client record whether or not there have
been any 'FoodServiceRecords' filed for that client. How can print only
those clients that have at least one FoodServiceRecord on file for the date
range specified? I guess I could loop through the recordset and delete those
client records with no child records, but is there something I can add to
the SHAPE command to do this?
Tim
- Next message: Rob Charlton Jr.: "RE: solution!!!!!!!!!!!!!!!!!!!!"
- Previous message: sheryl: "Network user count question"
- Next in thread: Tim: "Re: Data Report Designer and SHAPE command"
- Reply: Tim: "Re: Data Report Designer and SHAPE command"
- Messages sorted by: [ date ] [ thread ]