Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Choosing Date range and Shift with Crystal 8

Posted on 2001-08-01
6
Medium Priority
?
246 Views
Last Modified: 2012-06-27
Dear Sir;
 
 I am coding about Rstaurant System. It have Shift which can open 17.00 to 2.00 of new day.(17:00 of 1 Aug to 2:00 of 2 Aug) But it remain be 1 day of working.

 Although I can create Report by choosing each date with shift but I have problem about choosing Date Range by having Shift also.

Assume that I want to see 1 Aug to 5 Aug.. There are 2 Shift(17:00-21:00 and 21:01-2:00(new day))
It mean that (17:00 of 1Aug - (17:00 of Aug5 and 2:00 of 6Aug)) is what I will see in report.

Please reply me because it is Important. via email at u3520384@hotmail.com or talk your email to me...
So that I can contact you directly if you want more detail

I use MDB file is Database

Ake



 


0
Comment
Question by:u3520384
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 4

Expert Comment

by:YodaMage
ID: 6341812
Not quite sure what you need here.

What are you reporting off of? (DB? if so what is the file layout)

What do you want to see on the report exactly? (Sorts, Groups, Details, Totals, etc....Leave a short example)
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6342592
Why not subtract 2 hours from the date value during your query and add it back while printing the report?
0
 

Author Comment

by:u3520384
ID: 6344182
This is Real Expression I use in Selection Formula
({Sale_Order_Header.SO_Start_Date}>='2001/07/12' and {Sale_Order_Header.SO_Start_Time}>='09:00:00') //9:00 pm
Or ({Sale_Order_Header.SO_Start_Date}='2001/07/14' and {Sale_Order_Header.SO_Start_Time}<='02:00:00')  //2:00 am

I use this expression in Selection Formula, It list all record.
Problem: I want to view sale order of 2001/07/12 at 09:00:00 until  2001/07/14 at 02:00:00...

Please answer me please , or you send answer via email at u3520384@hotmail.com or post your email so that I reply back for more detail

Ake

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:YodaMage
ID: 6345922
You want and AND in place of your OR in your formula.
0
 
LVL 4

Expert Comment

by:YodaMage
ID: 6356126
All set???
0
 
LVL 3

Accepted Solution

by:
raj_nbr earned 1200 total points
ID: 6377185

First of all, you must use 24 hour format since you are using string variable to represent time.. Your 9PM will be 21:00:00 and not 09:00:00

Your logic has to be modified as follows.

Criteria : Start date, start time, end date, end time.

criteria :
(startdate = saledate and saletime >=starttime) or (enddate = saledate and saletime <endtime)

1. See if both dates are separated by more than one day.
If yes then

additional criteria: (saledate >= startdate+1 and saledate<= enddate-1)

Final criteria = criteria + " or " + additional criteria
else
final criteria =criteria

end if

This is the basic algorithm that will suit your requirements. Please kindly convert it to crystal formula, like date+1 , date-1 etc. Hope you will be able to do that.
 
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question