By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,830 Members | 2,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,830 IT Pros & Developers. It's quick & easy.

Displaying records without Dates in the end of the section

P: 3
I need to print a report of a bunch of records that falls between certain dates. Some records have dates and some don't. I did a UNION query to look for everything that falls between these two dates and everything that have NULL in date fields. Records get sorted in an ascending order. So, now I do see all the records, but I like to display records without dates in the end with another title. How could I do this.
Oct 19 '06 #1
Share this Question
Share on Google+
4 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Set a group on the report by the Date field.

This will order all records by date.

I need to print a report of a bunch of records that falls between certain dates. Some records have dates and some don't. I did a UNION query to look for everything that falls between these two dates and everything that have NULL in date fields. Records get sorted in an ascending order. So, now I do see all the records, but I like to display records without dates in the end with another title. How could I do this.
Oct 20 '06 #2

P: 3
yes, I did that. But that displays all records without date at first, and then displays in ascending order everything with dates. What I like to see is display everything with dates in an ascending order and then in the end display all records without dates.
If it is possible to merge two reports, I don't mind doing that instead.
Oct 20 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Create two subReports

1 with a record source where dates not null and the other with a record source where dates are null

yes, I did that. But that displays all records without date at first, and then displays in ascending order everything with dates. What I like to see is display everything with dates in an ascending order and then in the end display all records without dates.
If it is possible to merge two reports, I don't mind doing that instead.
Oct 20 '06 #4

Expert 100+
P: 1,221
Or use this in your query to change the date to the last day of the century if it is null. You'll be changing the query result, not the date in the table
[code] TheDate:IIF (IsNull([datefield],12/31/99,[datefield])

That returns the date itself or 12/31/99 in field TheDate.

Jim
Oct 20 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.