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

controlling record order

Status
Not open for further replies.

lshippee

Technical User
Jul 19, 2000
36
0
0
US
I have a report that shows data from a survey across multiple years.&nbsp;&nbsp;One of the bound controls is a survey date field which is placed in the details section.&nbsp;&nbsp;The report is also grouped by another category of information.&nbsp;&nbsp;I would like the data to show up consistently in the same year order<br><br>e.g. <br>Survey date = 1999<br>Survey date = 2000<br>. . . in that order for each record.&nbsp;&nbsp;Instead, some records have year 2000 first and some have year 1999 first -- this is a little tedious for the reader -- what suggestions does anyone have?<br>
 
What you might try is putting an expression in your underlying query to capture the year portion of the date:<br><br>Year: DatePart(&quot;yyyy&quot;,SurveyDate)<br><br>In the report itself, use Sorting/Grouping and set a group control on the Year field; you can either use or not use a group header/footer depending on how you want the info displayed.<br><br>Hope this helps. <p>Larry De Laruelle<br><a href=mailto:larry1de@yahoo.com>larry1de@yahoo.com</a><br><a href= > </a><br>
 
Thanks for your reply -- actually, I did go to the report and saw that the date field was not included in the sorting/grouping.&nbsp;&nbsp;When I added it, that took care of the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top