Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How Do I work with @opendatetime in Crystal Reports

Posted on 2011-09-16
8
Medium Priority
?
258 Views
Last Modified: 2012-05-12
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.  Opendatetime field
0
Comment
Question by:alpha100
[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
  • 3
  • 2
  • 2
8 Comments
 
LVL 101

Expert Comment

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

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 36553843
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
0
 

Author Comment

by:alpha100
ID: 36562746
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.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:alpha100
ID: 36562883
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.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 36563642
Is the Opendate a datetime?

If so use
{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
(
Time({TASKS.OPENDATE}) >= Time(17,0,0)  
OR
Time({TASKS.OPENDATE}) <= Time(8,0,0)

mlmcc
)
0
 
LVL 35

Assisted Solution

by:James0628
James0628 earned 1000 total points
ID: 36568419
 >  I would Provide the formula that would run the report
 > between 5:00 p.m. and 8:00 a.m.

 Are you trying to get the report to include data with times between 5 PM and 8 AM, or are you trying to schedule a report to be run automatically between 5 PM and 8 AM?  In that sentence it sounds like you mean the latter.

 If you're trying to schedule the report to be run automatically, a formula is not going to help.

 If you're trying to get the report to include data with certain times, I don't see the need for a formula.  Use something like mlmcc's last post, where you compare the time in your data with the literal times in question (5 PM and 8 AM).

 James
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 36998431
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

670 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