accessing data that is not in the query the report is based on

complexx

Registered User.
Local time
Today, 17:24
Joined
Dec 15, 2005
Messages
64
I have a report based on a query. The query contains a few fields that store integer numbers. Each field contains one number. I also have a table of comments which are indexed by integer values. I'd like to access the data in that table according to what numbers show up in my query results and then print those corresponding comments. But it seems that I can't figure out how to display data in my report that isn't part of the query it is designed with.
 
Did you try adding the Comments table to this query and linking the integer fields?
 
Well, it seems that I have run out of fields in my query so I'm stuck in a way until I can figure out how to get more data in there.
 
The original idea was to only pass the indexes I need to the report and have the report simply access that table with the corresponding comments in an effort to reduce the amount of info in the query.
 
You could also use a subreport and link the integer fields from the main report to the subreport
 
Rickster57 said:
Did you try adding the Comments table to this query and linking the integer fields?

I'm not sure I could effectively do that and make the data useful. The comments table is a list of predefined "responses." I want my service technition to simply add for example, a "1", and a "2" to the record for his current service visit and have the corresponding comment associated with those numbers show up on the report when I print it.
 
complexx said:
Well, it seems that I have run out of fields in my query so I'm stuck in a way until I can figure out how to get more data in there.
That sounds as though you have a basic design problem, post your table structure etc
 
Table Service Records: Date, Data, Data Data, COM1, COM2, COM3, etc...
Table Comments: CommentNum, Comment


I query the Table Service Records for several different records, then I order them according to date and query the top result (most recent date) for COM1, COM2, COM3, etc.

Each of the COM1, COM2, COM3, etc contain a single numerical value which corresponds to a specific CommentNum in the other table. I want to print out only the Comment that corresponds with the value of COM1, COM2, COM3, etc. and if the value of COM1 = 0, then nothin prints because there is no comment associated with the number 0.

I don't know why it won't allow me to add more values to my initial query. I would think that if I'm querying a table, it would at least allow me to query every field.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom