Search code examples
crystal-reports

rounding up to the next whole integer and adding days onto a fixed date - Crystal Reports


I have a result from a simple formula of "1.46". I require part of a formula to round the 1.46 to the next integer, for this example it would become "2.00".

I have a fixed date lets say "23/07/2014", If the previous example stated how many days would need to added onto the fixed date, how would I go about this?

I have tried to keep it as simple as possible to give clarity of what I require. If you need any more information, please ask.

Many thanks


Solution

  • For your first one you can use Round function.

    I didn't get the second requirement... any example will be useful

    Edit------------------------------------------------------------

    Let the round value is stored in a variable Store. Use below function to add that to date.

    DateAdd("d", Store, <<Datefieldhere>>)