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

How to display object even when a record does not exist for it. 1

Status
Not open for further replies.

falconstooth

IS-IT--Management
Dec 12, 2003
2
US
I have a set number of school IDs seperated into two groups that I need to print on a report. The schools are first seperated into school desigations. Then I have a second group for the IDs themselves. In other words:
GH1 = Middle Schools and High Schools
GH2 = School ID code
Each week all of these schools are to place orders for food for the cafeteria. However, some forget or get lost in overnight communications. Currently, my report displays whether or not each school has an order on the correct order day. What I need is to have every school in each group listed in the report whether they have entered an order or not. I use the following formula to determine the correctness of the orderdate:
If Weekday({RQRequests.NeedDate}) = 6 Then "Yes"
Else "No"
How can I get the schools who have not ordered at all (no record) to display?
Thank you
 
You must have a table/query in your database which is a list of all schools, and include that table/query in your report, using a left join on the the other table(s).

CR cannot report on data which does not exist.
 
If they don't exist, they don't exist.

Unfortunately you haven't shared basic technical information, so it's tricky to assist you:

Crystal version
Database/connectivity used
Example data
Expected output

Not sure what this has to do with any of this:

"If Weekday({RQRequests.NeedDate}) = 6 Then "Yes"
Else "No""

One way you might handle this is to change your record selection formula to the following:

Group by the skewl

Report->Edit Selection formula->Group

{RQRequests.NeedDate}=maximum({RQRequests.NeedDate},{RQRequests.skewl})

Now you'll get the latest row for everyone.

You can then suppress or identify data such as what was ordered by using a formula such as:

not({RQRequests.NeedDate} in lastfullweek)

There are other means as well, such as joining the table in again and doing a self join.

I would suggest that you request assistance with architecture rather than suggesting that people make your design work. Posting the requested info here will help others to assist you.

Hopefully this will resolve this for you, good luck with it.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top