Results 1 to 7 of 7

Thread: Math operations within a report

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2002
    Posts
    44

    Math operations within a report

    I am trying to divide a series of fields (pulled from an access database) by the total of the fields and have the output displayed as a percentage. I managed to figure out the summary box easily enough but for the life of me I cannot get the divide operation to work properly. What is ther syntax and code for setting this up? Also, does anyone know a good site or manual explaining the ins and outs of crystal as I am used to using 6 and not 9. Thanks!

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951
    So, (FieldA/Total)*100 doesn't give you the percentage number? Of course, the formatting is where you tell it to add the % at the end of the number.

    I use "The Complete Reference to Crystal Reports 9"

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2002
    Posts
    44
    I managed to ge the fornmula to work by switching it voer to basic syntax. i am still unable to find the percent field in the format field window however. I did put a workaround in though which was to just put a second text box right next to it with a percent sign in it. Is there a better way to go around doing this?

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Treat the percent sign like the currency symbol.

    In the Format Editor dialog click Customize.
    On the Currency Symbol tab check the Enable Currency Symbol box.
    Change the Currency Symbol to a % sign.


    I have version 8.5 but hopefully its the same in 9.

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2002
    Posts
    44
    Thanks that did the trick!

    I hate to do it but I do have one more question....

    I'm now creating a crosstab report with quarterly information residing in columns. However I would like all four quarters to be shown even if there is no data for that specific quarter yet, so that it will just fill in as the year progresses. I am also going to have quarterly percentile information posted as well but I am slowly building up to that functionality. Is there any way to build this crosstab report this other than manually? (Which would take forever) I'm porting the data all over from an access database with the data originally presented in excel embedded in word.

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Crystal cannot report on data that is not there (well duh). If I understand the problem correctly.

    1) You will need another table to link to your existing tables. This table would contain a record with the start and end dates for each quarter in the year. The rest of data is retrieved by using these dates (ie Left Join to your existing tables). Even if the data does not exist the "Quarter" is still returned.

    2) Create a subreport for the quarters. The sub report would print the "Quarter headings" and create the cross tab per quarter only. Add this sub report four times (or create a sub report for each quarter).

    3) How many fields do you have in your crosstab. Cross tabs can easily be created (although more work) by using running totals, summaries etc..

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2002
    Posts
    44
    Ok, I'm almost there! the inner join worked beautifully. I now have the four quarters listed even though the end three quarters are blank which is just the way I wanted it... but how do I add in columns with the percentages listed?

    For example, I am keeping track of six client groupings and am calculating their call volume in the quarter columns. I would now like to add a column next to that column listing the percentage of the total calls for each quarter. I have tried adding that field into the table I created for the inner join but it is unmodifiable once imported into crystal. And once the cross tab is created, I have been unable to add any columns that allow me to put in any user defined formulas..... Any ideas?

Posting Permissions

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



Click Here to Expand Forum to Full Width