Link to home
Start Free TrialLog in
Avatar of Cindy
CindyFlag for United States of America

asked on

How Do I work with @opendatetime in Crystal Reports

I am running a helpdesk support report in Crystal Reports.  I want to know how many tickets were received, opened and closed after a certain time of day.  Time is after 5:00 p.m.  I have a field on the report @opendatetime.  I wanted to know how would I enter that information in select expert to display that information on the report or do I have to write sql code to get the report to display that information.  Thanks.  User generated image
Avatar of Mike McCracken
Mike McCracken

What is @opendatetime?
Is it a SQL parameter?
If so you will have to write the select code in SQL.

mlmcc
What are you trying to do?

 In your screenshot, OpenDatetime is just a formula.  You edit that formula and it will produce whatever value you tell it to, and you can compare the value from that formula with a field in your data in the Select Expert.  That's fine if that's what you want to do.  For example, you might always want the report to run for the previous day, so you might have CurrentDateTime - 1 in the formula, so it would always produce yesterday's date.

 But if you want the user to get asked to select the date (and time) whenever they run the report, then you want a parameter.  Delete the OpenDatetime formula.  You don't have to delete it, but you don't need it, so you might as well delete it, to avoid confusion.  Create a parameter (under Parameter Fields) named OpenDatetime.  Set the type accordingly (presumably datetime).  Then use that parameter in the Select Expert.  Whenever you run the report, you will be prompted to enter a value for that parameter.

 James
Avatar of Cindy

ASKER

I don't need the time to be set up in the parameter .  I would Provide the formula that would run the report between 5:00 p.m. and 8:00 a.m.
Avatar of Cindy

ASKER

Here is the formula that is in the select expert
{TASKS.OPENDATE} = {?Please enter date range} and
{TASKS.TYPE} = "CJLEADS" and
{TASKS.RESPONS} in ["Bozza, Douglas", "Stowe, Peggy", "White, Allen", "Woodcock, Barry", "Penny, Michelle"] and
{@OpenDatetime} in DateTime (0, 0, 0, 0, 0, 0) to DateTime (0, 0, 0, 0, 0, 0)
 
I would like for the formual to be set so it will only display data between 5:00 p.m. and 8:00 a.m.  

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.