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

Is this possible to do?

Status
Not open for further replies.

pectin232

Technical User
Jan 22, 2011
67
US
I have a SQL on a report which populates a report. The query basically is a command and just drag and drop those individual values onto the report. The first 2 name values will always be a Doctor and the second a Therapist. As the values will populate the form through command, I am not sure how to create a static label or what methods are possible?
 
If you place them in the detail section, labels should automatically be created. Then move the fields to the group header (the labels will be in the report header). You could also make these manually by inserting text boxes.

However, this appears to be a subreport, which doesn't have page headers, so if you need these to repeat on each page, you need to create a formula like this:

whilereadingrecords;
""

Insert a group on this formula and then make it Group #1 and select "repeat group header on each page". Then use this new group header as your page header for the labels.

-LB
 
I have moved the fields now according to the following:

GH1: Name Role Address Telephone
Details Group #1 Role Address Phone

After doing this, on the name/ group#1 I get a person listed 2-6x of his or her other possible roles they have been in. The values I want are the 1st 2 to be a doctor and therapist and the others to show whatever the database
 
Sorry, I didn't read your requirements carefully enough, but this seems to be the same issue as in thread149-1653299. Is this a homework assignment or something?

-LB
 
putting the information into the header portion has eliminated the duplicates. I am wondering if the the report can be coded to show the first 2 results as being 'Doctor' and 'therapist' while the others remain as what they are from the database?
 
What field tells you that the first record is Doctor and the second Therapist?

-LB
 
Please read my response in the linked thread--use next() or use a subreport.

-LB
 
Can a new subreport be inside a subreport? Thanks LB
 
No, subreports cannot be nested. Why not just display the first two records for each group? You can use suppression to do this. Create a running total that counts any recurring field and which resets on change of group. Then suppress all records with an #rt > 2.

-LB
 
I have placed name in the GF1, while others in GH1. I somehow cannot limit it to show the first 2 records only in x+2.
 
I don't know what you mean. I mean just to show the first two detail records.

-LB
 
In retrospect, I don't really follow what you are trying to do. What field are you grouping on? Showing a picture of design mode isn't really that helpful. Instead, please show a sample of how your data is currently displaying in the detail section. Then show a sample of how you want it to display. There is probably a different approach.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top