locked
Percentages in crystal report RRS feed

  • Question

  • User1406973109 posted

     Hi all, please i have this type of data and i need help

    Etisalat  - Group

    Media          May            June

    TV Total       566484      687585

    Radio Total  273848      734849

     

    GlobaCom - Group

    Media          May            June

    TV Total       373644      675738

    Radio Total  172736      436487

     

    how can i format my report to achieve something like this:

     

    Etisalat  - Group

    Media          May            June

    TV Total       566484      687585

                        60%           53%

    Radio Total  273848      734849

                        70%           80%

     

    GlobaCom - Group

    Media          May            June

    TV Total       373644      675738

                        40%          47%

    Radio Total  172736      436487

                        30%          20%

     

    Please any help will be appreciated.

     

    Thanks

    Timotech

    Tuesday, August 24, 2010 7:22 PM

Answers

  • User-1802908944 posted

    for caclutation of % in Crystal Report you need to add a formula field in your report

    add formala

    edit it and use like

    =(field1 * field2 /100) + " %"

     

    you need to add % symbol manually.

     

    check like

    http://www.tek-tips.com/viewthread.cfm?qid=1475713&page=1

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 25, 2010 1:47 AM
  • User1406973109 posted

    hi

    I tried this and it gave me something close to what i wanted:

    if {stp_GetShareOfVoiceReportByValue_sel;1.Media} = "TV Total" then
    {stp_GetShareOfVoiceReportByValue_sel;1.May} % Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May},{stp_GetShareOfVoiceReportByValue_sel;1.Brand} ) 

    it was a function for summing that is of this format Sum(fld, CondFld)

    The CondFld is a boolean type indicating the grouping on the report to be summed.

    but i'm still getting wrong percentages

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 25, 2010 9:47 AM

All replies

  • User-1802908944 posted

    for caclutation of % in Crystal Report you need to add a formula field in your report

    add formala

    edit it and use like

    =(field1 * field2 /100) + " %"

     

    you need to add % symbol manually.

     

    check like

    http://www.tek-tips.com/viewthread.cfm?qid=1475713&page=1

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 25, 2010 1:47 AM
  • User1406973109 posted

    hi thanks for your reply, it was very helpful, but one problem, i'm encountering is that when i use this formula:

    if {stp_GetShareOfVoiceReportByValue_sel;1.Media} = "TV Total" then
    {stp_GetShareOfVoiceReportByValue_sel;1.May} % Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May}) 

     

    The results, i'm getting are not the actual percentages, and i discovered that the Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May}) is actually summing for both the 'TV Total' and 'Radio Total' for that particular month May, please how can i make sure that it only sums the values in May for 'TV Total' alone, excluding 'Radio Total' for May. Thanks

     

    Wednesday, August 25, 2010 8:44 AM
  • User1406973109 posted

    hi

    I tried this and it gave me something close to what i wanted:

    if {stp_GetShareOfVoiceReportByValue_sel;1.Media} = "TV Total" then
    {stp_GetShareOfVoiceReportByValue_sel;1.May} % Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May},{stp_GetShareOfVoiceReportByValue_sel;1.Brand} ) 

    it was a function for summing that is of this format Sum(fld, CondFld)

    The CondFld is a boolean type indicating the grouping on the report to be summed.

    but i'm still getting wrong percentages

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 25, 2010 9:47 AM