This is a migrated thread and some comments may be shown as answers.

Problem with Formatting Number in Group Footer

2 Answers 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 13 Jul 2009, 03:45 PM
Good Morning.

I am working on a report that needs to show detail about a group of data and then have a group footer that counts the occurences, sums up the total number of days and also shows the average number of days for the group. Everything seems to be working and I am getting the correct values but I can not format the average number of days to show 1.55 instead of 1.578901234.

I have entered {0:N2} in the Format field for that text box's properties and that seems to have no effect.

I am also having a problem when exporting the report to Excel it is showing all of the number fields as text in the spreadsheet, even though I am using {CDbl(Fields.[DAYS_BETWEEN])} as my Value.

I would appreciate any help that you can give me on these problems. I am using Telerik Reporting Q1 2009.

Tim

2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 13 Jul 2009, 04:34 PM
Hi Tim,

Please change the value from {CDbl(Fields.[DAYS_BETWEEN])} to =CDbl(Fields.[DAYS_BETWEEN]). The {} brackets mean that this is "embedded expression" and they are evaluated to string values, and your formatting becomes erroneous.
Using = means that the value of the expression would be evaluated directly and thus, you can format it at will. We've already changed the behavior of the expression editor in Q2 2009, so that it does not use embedded expression by default.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tim
Top achievements
Rank 1
answered on 13 Jul 2009, 05:19 PM
Steve,

Thanks for the quick response. I made the change and everything is working great.

Thanks again.

Tim
Tags
General Discussions
Asked by
Tim
Top achievements
Rank 1
Answers by
Steve
Telerik team
Tim
Top achievements
Rank 1
Share this question
or