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

Detail field in report flow

Status
Not open for further replies.

roselam

Technical User
May 14, 2003
15
US
I have a table that lists students' names and various awards that they got. For example, Smith has received Award1, Award2, Award3 and Jones received Award1. I want to produce a report that will list each award with a comma after it. I don't want it to be in columns or separate rows. How can I make the different awards print on the same row?
 
Does each record only have one award list in it?
Example:
Smith Award1
Smith Award2
Smith Award3
Jones Award1

Is this the situation?

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
yes, that is exactly how it looks. I want it to look like this on a report

Smith
Award1, Award2, Award3

Jones
Award1

I have seen your responses to other similar requests on this site and you usually type up a code which I have tried to copy without success.
Can you do this without programming? I don't know how to program so I'm not very good at fixing it when it doesn't work. Thanks!!
 
I am sure we can get this to work for you. I will work with you until it is working. Do you want to try?

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
YES! Thanks! The query name is "Que StudentAwards" The field that is in the main report (LetterMainform) is "StudentID" The field in the subreport (LetterSubform) is "AwardName" This last field is the field that I want to display horizontally.
 
Are you using the subform as a means to try to create this horizontal text field? Why the subform? I just need to know how your report is working so that I can adjust this code for you. If you want to send me the database via email see my profile. I will only use that to see how you are doing this and then restate the situation in the posting so that others may benefit from your situation.

You see we don't working outside of TT but sometimes it is necessary to see your DB to clarify some issues.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Yes, I was using the subreport because my temporary fix was to format the subreport in 2 columns to use up more horizontal columns. It does not have to be a subreport as all the information is in the one query and I can just group them. I can email you the file if you think that would help. Thanks!
 
Yes please do that.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Ooops, sorry actually I had the subreport in there because I need the detail to show up twice, once on the upper portion of the letter and once on the bottom (because the recipient is supposed to tear off the bottom portion which lists the details again). Thanks!
 
See Thread: thread703-495410

I used the techniques detailed in the above thread with your database. The only thing I had to do slightly different was create a query to select the awards for the particular studentID using a global variable and function. I create an additional column in the query for the Awards string and cancatenaged a carriage return between the awards. Then in the report I set the Can Grow property of the Awards to Yes. This allows the control to display as many lines as there were awards for the student.

I have sent the DB back to you. Good luck with the project.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top