Problem with Formatting Number in Group Footer

3 posts, 1 answers
  1. Tim
    Tim avatar
    3 posts
    Member since:
    Feb 2009

    Posted 13 Jul 2009 Link to this post

    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. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 13 Jul 2009 Link to this post

    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.
  3. DevCraft banner
  4. Tim
    Tim avatar
    3 posts
    Member since:
    Feb 2009

    Posted 13 Jul 2009 Link to this post

    Steve,

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

    Thanks again.

    Tim
Back to Top