Well - that's how I do it.
I am curious what other people do - but I can't imagine another way.
Another approach might be to create some generic output fns/custom tags.
<cf__CustomReport Qry="myQry" GroupBy="Department, Manager" />
You would need to make sure the qry was written appropriately to the output
requested.
Damn you - you make me feel like coding it. Cause its a good idea. You could
use a style sheet to customize the appearance.
Eric
From: Thane Sherrington <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: CF-Talk <[EMAIL PROTECTED]>
Subject: Grouping issue
Date: Mon, 27 May 2002 11:45:06 -0300
I have a database with three tables:
Departments
ID
Name
Managers
ID
Name
DeptID
Workers
ID
Name
ManagerID
I'm creating a report that looks like this:
Dept 1
Manager1
Worker1
Worker2
Worker3
Manager2
Worker4
Worker5
Dept2
Manager3
Worker6
Worker7
Etc.
The first time I did this report, I did a query loop through departments,
with a nested loop through managers, and finally a nested loop throuh
workers. But this was three queries, which seemed inefficient.
So then I created a single query, but it kept repeating the dept or manager
name for each worker, so I instead did this (pseudocode):
begin dept loop
if deptname NEQ olddeptname
display deptname
else
if managername NEQ old managername
display managername
else
display workername
endif
endif
end loop
I'm not sure if this is the right approach either. Is there a way either
in SQL or Coldfusion to have it only show the department and and manager
the first time the value appears?
T
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists