Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Kinamu reports: How to remove "text-align:right" and "</div>"

  1. #1
    raulisea is offline Junior Member
    Join Date
    Nov 2011
    Posts
    3

    Default Kinamu reports: How to remove "text-align:right" and "</div>"

    Hi everybody!

    Everytime I export a "Opportunities" kinamu report to the .CSV file, it shows some extra info in the "Ammount" and/or "Opportunity ammount" column "<div style="text-align:right;">Bs.25.000</div>"

    After I set my "Comma separated text in columns" in Excel I end out with a report like this:


    Please help me out with the removal of "<div style="text-align:right;"> and </div>" from this report

    Sugar Community Edition
    Versión 6.2.4 (Build 6735)
    KinamuBasePackage_V_1_0
    KReporterBasic_V_2_6_1


    Thanks in advance.

  2. #2
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    edit modules/KReports/KReport.php and find the line:

    case 'currency':
    // 2010-12-16 right align the field if it is a currency field
    $fieldValue = '<div style="text-align:right;">' . currency_format_number($fieldValue, array('currency_id' => $fieldArray[$fieldID . '_curid'], 'currency_symbol' => true)) . '</div>';
    break;

    and take the formatting way.

    The issue is fixed with proper div and text alignment as well as proper UTF8 Currency Symbol in the current release but requires some additional parameters that are getting passed through the chain. For a quick fix that should be sufficient.

    christian.

    Quote Originally Posted by raulisea View Post
    Hi everybody!

    Everytime I export a "Opportunities" kinamu report to the .CSV file, it shows some extra info in the "Ammount" and/or "Opportunity ammount" column "<div style="text-align:right;">Bs.25.000</div>"

    After I set my "Comma separated text in columns" in Excel I end out with a report like this:


    Please help me out with the removal of "<div style="text-align:right;"> and </div>" from this report

    Sugar Community Edition
    Versión 6.2.4 (Build 6735)
    KinamuBasePackage_V_1_0
    KReporterBasic_V_2_6_1


    Thanks in advance.

  3. #3
    raulisea is offline Junior Member
    Join Date
    Nov 2011
    Posts
    3

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    Mr. Christian:

    Thanks a lot for your helpful response.

    Could you please detail the meaning of "take the formatting way". I found the spcefic line you reffered me to, but I'm not quite sure what to do and I am affraid of mess something up which could affect the performance of the Kinamu Reporter.

    Thank you so much once again.

    Raúl.

  4. #4
    beschaeftigt.de's Avatar
    beschaeftigt.de is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    Europe
    Posts
    24

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    Hello Christian,
    I encountered the same problem. Could you please give me a hint when to expect a new Version of your really great reporting tool.

    I also saw that it is now possible to add custom functions. But I did not succeed in using them. Could you please explain how to access values and what syntax to use in this field?
    Kind regards and many thanks,
    Paul

  5. #5
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    $fieldValue =currency_format_number($fieldValue, array('currency_id' => $fieldArray[$fieldID . '_curid'], 'currency_symbol' => true)) ;

    Quote Originally Posted by raulisea View Post
    Mr. Christian:

    Thanks a lot for your helpful response.

    Could you please detail the meaning of "take the formatting way". I found the spcefic line you reffered me to, but I'm not quite sure what to do and I am affraid of mess something up which could affect the performance of the Kinamu Reporter.

    Thank you so much once again.

    Raúl.

  6. #6
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    Just write sql code. Use $ for the field you are looking at. if you e.g. have a date field and you write the custom function 'QUARTER($)' this will return the quarter for that date.

    christian

    Quote Originally Posted by beschaeftigt.de View Post
    Hello Christian,
    I encountered the same problem. Could you please give me a hint when to expect a new Version of your really great reporting tool.

    I also saw that it is now possible to add custom functions. But I did not succeed in using them. Could you please explain how to access values and what syntax to use in this field?
    Kind regards and many thanks,
    Paul

  7. #7
    beschaeftigt.de's Avatar
    beschaeftigt.de is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    Europe
    Posts
    24

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    Thanks a lot for your help.

  8. #8
    chris.marsden is offline Sugar Community Member
    Join Date
    Sep 2011
    Posts
    57

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    Revived thread

    I have this same problem but can not find how to remove the <div style="text-align:right;">Â i have.

  9. #9
    beschaeftigt.de's Avatar
    beschaeftigt.de is offline Sugar Community Member
    Join Date
    Mar 2009
    Location
    Europe
    Posts
    24

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    you mean you don't find it at: modules/KReports/KReport.php ?

    search for the code starting with:
    PHP Code:
    case 'currency'
    replace:
    PHP Code:
    $fieldValue '<div style="text-align:right;">' .  currency_format_number($fieldValue, array('currency_id' =>  $fieldArray[$fieldID '_curid'], 'currency_symbol' => true)) .  '</div>'
    by:
    PHP Code:
    $fieldValue currency_format_number($fieldValue, array('currency_id' =>  $fieldArray[$fieldID '_curid'], 'currency_symbol' => true)); 
    Kind regards,
    Paul

  10. #10
    chris.marsden is offline Sugar Community Member
    Join Date
    Sep 2011
    Posts
    57

    Default Re: Kinamu reports: How to remove "text-align:right" and "</div>"

    I have just realized I have made a very silly mistake.

    this only appears when i export to excel.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. kinamu reports
    By dianalizeth30 in forum Developer Help
    Replies: 0
    Last Post: 2011-04-06, 06:48 PM
  2. Replies: 2
    Last Post: 2010-04-15, 08:56 AM
  3. Replies: 7
    Last Post: 2010-04-12, 06:47 PM
  4. Replies: 2
    Last Post: 2010-03-17, 10:47 AM
  5. Kinamu Full text search
    By kalaisugar in forum Developer Help
    Replies: 5
    Last Post: 2009-07-17, 06:06 AM

Bookmarks

Posting Permissions

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