Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting issue

Status
Not open for further replies.

McChops

Technical User
Oct 1, 2002
29
0
0
AU
Crytal Reports 10
CE10

I have 5 formulas.

"Activity Date" date({View_Issue_Act_Log.time_stamp})
"Year" year({@Activity Date})
"Month" month({@Activity Date})
"Month Format" if {@month} in 1 to 9 then 0&{@month} else totext({@month})
"Year/Month" {@Year}&"/"&{@Month Format}

I have a bar graph which displays the total count of records by month (using formula Year/Month).

The bars are ordered in logical month order and are displayed as (for example)

2006/11
2006/12
2007/01
2007/02

This is all fine and how I want them.

However when I upload to CE and run (ActiveX viewer), it prints the year/month formula as

2,006.00/11.00
2,006.00/12.00
2,007.00/01.00
2,007.00/02.00

Do I need to install a patch? Can I add something to the formulas to prevent this from occuring in the ActiveX viewer?

Thanks,

Tom


 
In Crystal Reports, check File > Options > Fields. You'll find that there are defaults set up, including the number of decimal places. You don't get decimal places for dates, so I assume your dates are interpreted as numbers within the reports.

One answer would be to change the defaults within Crystal Explorer - I don't have access to it, but I'd suppose it was much the same. But this might upset other data where you do want decimals.

Or you could define the fields using ToText. E.g.
Code:
ToText({@Activity Date}, "yyyy/MM)
This will stay the same regardless of defaults.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks Madawc,

My defaults are for no decimal points or commas (-1123 in the 'Number' defaults).

Unfortunately I need the date to be a number so the months order themselves correctly when printing the chart.

The annoying thing is these display correctly when previewing in Crystal Reports. It's only when I upload them to Crystal Enterprise and preview them in the DHTML or ActiveX viewer that the decimal points and commas appear.

Makes me think it might be a setting (or a bug) in Crystal Enterprise....

Anyone?

Thanks,

Tom.
 
You might be more likely to get help in forum782 or forum768.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top