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

x
?
Solved

Change Crystal Reports time format

Posted on 2011-03-23
9
Medium Priority
?
669 Views
Last Modified: 2012-05-11
I'm using VS 2010 and have the "CR for VS 2010" production release. I do NOT have a full version of CR, just the free one that works inside VS.

I have a report that displays time in 12 hr format. I need to be able to pass it a parameter and have it correspondingly give 12 or 24 hr format. Is there a way to do this?
0
Comment
Question by:BlearyEye
[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
  • 5
  • 4
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 35202794
Are you trying to pass just the time or a full datetime

mlmcc
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 35202841
I'm not passing the time; I'm passing a parameter to control how time will be displayed.

The database variables involved are all full datetime.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35202938
You could pass a parameter with values 12 or 24

You can then display the time through a formula

After you put the datetime field on the report
Right click it
Click FORMAT FIELD
Click CUSTOMIZE
Click the TIME tab
Click the formula button to the right of 12 or 24 hour
Enter this

If {?Parameter} = 12 then
    crTwelveHour
Else
    crTwentyFourHour

mlmcc
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:BlearyEye
ID: 35203193
I did a search for crTwelveHour and crTwentyFourHour wrt Crystal Reports but did not find anything relevant. Can you give me a pointer?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35203277
What do you mean?

They are values for an Enumerated type.

mlmcc
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 35203354
Hmmm ... that's new to me. I'll give it a try tomorrow.
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 35203388
btw, crTwelveHour and crTwentyFourHour are formats for I-net Crystal Clear (aka Inet Clear Reports; https://www.inetsoftware.de/reporting/feature/timeproperties.pdf). Are you sure you weren't thinking about this rather than Crystal Reports?

Anyway,will give it a run tomorrow.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35203397
No.  I copied them from the Crystal format formula screen

mlmcc
0
 
LVL 1

Author Comment

by:BlearyEye
ID: 35215091
I managed to get suitable test environment set up, and your suggestion works well. Thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

730 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