Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2013

    Unanswered: Carriage return in a Crystal Formula

    Crystal Version 11 R2

    I'm working in a cross tab report and I need to place the Week # (data field in a table - datatype is Number) and the Day number (formula I built) in the X axis of the report. The fields need to be 1 atop the other like this:

    Week: 1 2 3 4 etc
    Day: 1 8 15 22 etc

    The weeks need to display in numerical order across the top of the crosstab.

    EDIT: OK, I noticed that the numbers in my illustration are not aligned like they should be. Just bear in mind that I need 1 & 1 vertically aligned with each other, 2 & 8 aligned, 3 & 15, etc.

    The Day field is a formula I built that is simply


    My idea was to create a formula that placed the Week # on line 1, do a Carriage Return then place the Day # below the Week #. Here's the formula I built to do that:

    {CrystalData.WeekAsNum} + chrw (13) + {@Day Number}

    The problem is, the formula evaluator keeps telling me "A number, currency amount, date, time, or date-time field is required here." It highlights the chrw (13).

    If I change the formula to set the Week & Day fields as Strings, it of course displays the weeks as 10, 11, 12, etc., then 3, 4, 5, etc., which won't work. Same thing if I use this formula:

    {CrystalData.WeekAsNum}&chrw (13)&{@Day Number}

    If I place the 2 fields in the X axis of the Crosstab Expert then I get an unnecessary Total column that I can't remove.

    How can I get around this limitation in Crystal that won't allow me to place a carriage return in the midst of number fields???


    Last edited by MikeA57; 01-24-13 at 11:50. Reason: Explain illustration that didn't post correctly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts