Results 1 to 6 of 6

Thread: Problem with First Names and Reports

  1. #1
    mergulhao83 is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    27

    Default Problem with First Names and Reports

    I have some reports here. One of them shows Contacs with some rules. There is a bug in Reports that makes the name of a Contact be not showed in Report(any of them: pdf, html) if this contact don't have an First Name. Others informations about the contact are showed ok. So I think its a problem in concatenation of the first and last name.

    I searched in the code but there are hundreds of locations that makes this concatenation... A violation of the DRY concept, but its other discussion.

    Anyone know how to solve this?

    Thanks.

  2. #2
    mergulhao83 is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    27

    Default Re: Problem with First Names and Reports

    No answers again? Have I only difficult questions?
    Last edited by mergulhao83; 2007-03-05 at 05:33 PM.

  3. #3
    malcolmh's Avatar
    malcolmh is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Aug 2004
    Posts
    1,712

    Default Re: Problem with First Names and Reports

    Hi,

    I was able to reproduce your error in 4.5.0h. Which version were you using?

    Have you registered a support case? If not I would recommend doing so.

    A workaround to your problem is selecting first & last name separately.

    Hope this helps
    Cheers Malcolm

    Genius4U Limited - Ingenious simple IT solutions for you / Genial einfache IT Lösungen für Sie
    http://www.genius4u.com or http://www.genius4u.de

  4. #4
    davidcosine is offline Technical Support Engineer
    Join Date
    Mar 2007
    Posts
    4

    Default Re: Problem with First Names and Reports

    Dear Sugar User;

    This issue is should not occur if you upgrade your version to 4.5.1 or later.

    Thanks;
    David Kosy

  5. #5
    mergulhao83 is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    27

    Default Re: Problem with First Names and Reports

    I'm using 4.5.1 version Pro. I've found the solution by myself.

    Edit the file /include/generic/SugarWidgets/SugarWidgetFieldname.php

    Look around line 100... You will found this:

    Code:
                                    $alias .= "CONCAT(CONCAT("
                                            .$table_alias."."
                                            .$field_def['fields'][0].",' '),"
                                            .$table_alias."."
                                            .$field_def['fields'][1].")";
    Exchange by:

    Code:
                                    $alias .= "CONCAT_WS(' ',"
                                            .$table_alias."."
                                            .$field_def['fields'][0].","
                                            .$table_alias."."
                                            .$field_def['fields'][1].")";
    Test it.

  6. #6
    Join Date
    Feb 2007
    Location
    San Jose, CA
    Posts
    1,169

    Default Re: Problem with First Names and Reports

    Hi mergulhao83,

    Thank you for sleuthing out the answer! Great detective work. You can contribute your fix to the Open Source community by following the instructions on this website.

    Regards,

    -Susie
    Susie Williams

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Target Lists - Contacts - Select from Reports
    By george_bbch in forum Marketing/Campaign Management
    Replies: 8
    Last Post: 2011-06-08, 03:40 PM
  2. Problem with editing Employee List View
    By aheavilin in forum Help
    Replies: 0
    Last Post: 2006-06-07, 05:06 PM
  3. MailMerge - Accounts w/contact names
    By tlang in forum Help
    Replies: 3
    Last Post: 2005-10-11, 11:41 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
  •