Solved

Crystal Reports - Replace certain text from database

Posted on 2004-08-04
3
1,011 Views
Last Modified: 2010-05-18
We are using Crystal Reports 8.  We have a report already created, but the person who will be using it wants a date field of a record in the report changed if the time for that record is 11pm.

Source of the data is an SQL database that we cannot edit.  I need to know where I can put in an "If/Then" so that when a record's time is 11pm, for it to display the date of that record -1 day.  For Example, the record in the database would have the following:

wc_schedule_part_tool_view.time_schd = 11pm
wc_schedule_part_tool_view.date_schd = 08/04/04

We want it to then display this record as:

wc_schedule_part_tool_view.time_schd = 11pm
wc_schedule_part_tool_view.date_schd = 08/03/04

Thanks.
0
Comment
Question by:Luniz2k1
[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
  • 2
3 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 11719217
What you need to do is instead of displaying the wc_schedule_part_tool_view.date_schd field, create a formula that will output the display.  Your formula would be this:

if hour({wc_schedule_part_tool_view.time_schd}) = 23 then
   DateAdd('d',-1,{wc_schedule_part_tool_view.date_schd })
else
   {wc_schedule_part_tool_view.date_schd}

Use the formula instead of the date field and you're all set.

frodoman
0
 
LVL 5

Author Comment

by:Luniz2k1
ID: 11719597
Perfect.  Thank you very much.
0
 
LVL 42

Expert Comment

by:frodoman
ID: 11719611
Glad I could help - frodoman
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
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: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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