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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unbound Elements in Reports

Status
Not open for further replies.

dexsquab

Programmer
Jan 13, 2005
11
GB
I'm at a loss as to what to do next, and would dearly appreciate some assistance.

My database captures client details, and I have to provide a demographic breakdown. Now the nature of the demographics changes depending upon whom I need to report to, so it's done via a query using SQL and a UDF (basically, it breaks people down into male/female and age brackets).

The codes are determined fine, I'm happy with the query and everything else. When it comes to the report, I wanted to really control the display so I've manually built a 'display case', a classic grid which I want the data to display in.

Example:
...........<25....25-39....40-45.... Total
Male
Female

Now the details are being counted correctly, I have a query which already holds the values that need to be placed in the above grid. The query is called DC Count (grouping together all clients of the same code).

I'm assuming I make unbound boxes, and use SQL to extract the info from the query to the report.

How do I do that?
 
Alright, in trying out various options, I've been trying something like this:

=SELECT ([CountOfClient ID]) FROM ([DC Count]) WHERE ([DC]) = 1

This is designed to extract a single value from a query DC Count, looking in column CountOfClient ID for the value related to the value DC=1.

It's wrong... but how wrong? No idea...
 
I've also tried all these too...

=SELECT [CountOfClient ID] FROM (DC Count) WHERE [DC]=1

SELECT [CountOfClient ID] FROM [DC Count] WHERE [DC]=1

SELECT [CountOfClient ID] FROM (DC Count) WHERE [DC]=1

=SELECT "[CountOfClient ID]" FROM "[DC Count]" WHERE "[DC]=1"

SELECT [DC Count].[CountOfClient ID] FROM [DC Count] WHERE [DC Count].DC=1

=SELECT [DC Count].[CountOfClient ID] FROM [DC Count] WHERE [DC Count].DC=1

I feel like I'm playing Battleship... L7? Oh no, they got my sub :(
 
Hello? No one can help?

I didnt think it would be a difficult question, to find out how to load a single data element to an unbound box on a report.

*mutters a bit*
 

Never tried that one.

Play with the record source query until you get the bit you want on there, even if is repeated, and give it a sensible alias

Then include the alias as a bound field on the report - from your description is sounds like it might need to be in a group header.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top