Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference Cell data

Status
Not open for further replies.

rhardie

Programmer
Sep 27, 2001
5
0
0
US
I have a report built using Freehand SQL. There are two data providers which have been linked by a common column.
The first data provider populates a section holding basic data about an object (for example a piece of equipment, it's EQ number, description, etc). Within the Equipment section is a table who's data source is the second data provider. This table need to be filtered, based on the value of the EQ number in the Equipment section.

Can I reference the value of a cell in a formula? My attempts seem to reference all values of that cell in the entire report, therfore loading the table will all records.

Hope this makes sense.

Russell
 
Thanks for the response. That is what I need to do, but the condition will change as we move thru each record of the report. Maybe the illustration below will explain a little better. This is a common master/detail report, but the problem I'm having is that there is 1 master and 2 details

___________________________________________________________
AUDIT REPORT

---section Equiptment--1st qry get all disctinct equipt-----
EQUIP#: 12345
EQUIP DESC: WIDGET
---section Tasks--2nd qry to get all future planned maint--
--scheduled task 1--related by equip number
Task#: 121212
Task Desc:Check oil level
Next Due Date Frequency(Days) Task Type
10/30/2001 30 DOT
--scheduled task 2---related by equip number
Task#: 333333
Task Desc:Change belts
Next Due Date Frequency(Days) Task Type
10/30/2001 30 DOT
---end of task section--------------------------------------

---section work orders 3rd qry to get history of tasks done-
..also related by equip number, but closed events(history)..

WO# Completed By Date Performed Comments
___________________________________________________________
12 RCH 09/30/2001 Oil Level fine
16 RCH 09/30/2001 Changed belts
........and so on, would be constrained by a date range..
---end of work order section-------------------------------
---end of equipment section--------------------------------
---next equipment record-----------------------------------
EQUIP#: 55555
EQUIP DESC: SUPER WIDGET
---section Tasks--2nd qry to get all future planned maint--
--scheduled task 1--
Task#: 99999
Task Desc:Grease Bearings
Next Due Date Frequency(Days) Task Type
10/30/2001 10 DOT
--scheduled task 2---
Task#: 666666
Task Desc:Change Air Filter
Next Due Date Frequency(Days) Task Type
10/30/2001 60 DOT
---end of task section--------------------------------------
---section work orders 3rd qry to get history of tasks done-
WO# Completed By Date Performed Comments
___________________________________________________________
22 RCH 10/20/2001 Grease Bearings
16 RCH 08/30/2001 Changed Air filter

........and so on, would be constrained by a date range..

---end of work order section-------------------------------
---end of equipment section--------------------------------
---next equipment record-----------------------------------
and so on and on.......................
-------END OF REPORT----------------------------------------

So by the nature of this report I need the master query
to get all distinct equip #'s. Then get all scheduled
tasks to be performed against each equipt#.
Then get all history (closed work orders, which are assigned tasks) against this equip #.

I don't see a way to do this with a single data provider
so I am using 1 for the equiptment and tasks and a second for the historic data. I need a way to bind the 2nd query to the record (equip #) the 1st query is on, then bind again when qry 1 moves to the next record.

I've tried "linking" the 2 queries using the equipt # column but this link seems to be treating it as a
"IN" clause (WHERE EQNUM IN (1,2,3,4,....) instead of
(WHERE EQNUM = 1). Therefore each equipment section
lists the work orders (or a blank row) for every distinct equip #.

I was hoping I could filter the Work Orders based on the value in the Equip# cell on the report

Thanks,
Russell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top