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

Thread: Zucker Report Opportunities Break down

  1. #1
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default Zucker Report Opportunities Break down

    Sugar Version 5.0.0c (Build 3187)
    Zucker Version 1.9

    I am trying to create a report in Zucker reports where oporunities for the current user are displayed.

    I can a list of opportunities to display but when i fillter bu parameter " CURRENT USER " it returns no result.

    The current user parameter is supposed to return the ID of the current user which should match with some of the "assigned_user_id" for the opportunities.

    Any help will be apreciated.

    Thanks

  2. #2
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default Re: Zucker Report Opportunities Break down

    Hi Guys amd gals, Any help here would be appreciated.

  3. #3
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Zucker Report Opportunities Break down

    You could create a report from a custom SQL query without any parameter.
    Just create the report and define in it the query to extract what you want.
    What do you think the cookie monster eats ?

  4. #4
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default

    Hi Thanks

    The reason for going via the listings template way was that when i ran the sequal query

    SELECT opportunities.name, opportunities.amount, opportunities.date_closed
    FROM opportunities, accounts_opportunities
    WHERE opportunities.deleted = 0
    AND opportunities.assigned_user_id='$SUGAR_USER_ID'
    AND opportunities.id = accounts_opportunities.opportunity_id

    Then the accounts name would be the same as the opportunities name, depending on the order of the query. Like if the accounts name was ABC and the opportunities name was DEF then the report would show DEF DEF or ABC ABC depending on which name got called second.

  5. #5
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Zucker Report Opportunities Break down

    Quote Originally Posted by nvdp2002
    Hi Thanks

    The reason for going via the listings template way was that when i ran the sequal query

    SELECT opportunities.name, opportunities.amount, opportunities.date_closed
    FROM opportunities, accounts_opportunities
    WHERE opportunities.deleted = 0
    AND opportunities.assigned_user_id='$SUGAR_USER_ID'
    AND opportunities.id = accounts_opportunities.opportunity_id

    Then the accounts name would be the same as the opportunities name, depending on the order of the query. Like if the accounts name was ABC and the opportunities name was DEF then the report would show DEF DEF or ABC ABC depending on which name got called second.
    Try the query in PHPMyAdmin and see if it works correctly there or not.
    What do you think the cookie monster eats ?

  6. #6
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default Re: Zucker Report Opportunities Break down

    Hi

    I meant to include accounts.name in that query , so its suppose to look like this.


    SELECT accounts.name, opportunities.name, opportunities.amount, opportunities.date_closed
    FROM opportunities, accounts_opportunities
    WHERE opportunities.deleted = 0
    AND opportunities.assigned_user_id='$SUGAR_USER_ID'
    AND opportunities.id = accounts_opportunities.opportunity_id

    phpmyadmin is for MySQL rite? i have mssql running on the server. Ill use the admin tools that come with that and let you know.

  7. #7
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Zucker Report Opportunities Break down

    Quote Originally Posted by nvdp2002
    i have mssql running on the server. Ill use the admin tools that come with that and let you know.
    Ok, then open SQL Server Management Studio Express and try there your query.
    What do you think the cookie monster eats ?

  8. #8
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default Re: Zucker Report Opportunities Break down

    This is what i get when i enter the query

    SELECT accounts.name, opportunities.name, opportunities.amount, opportunities. date_closed
    FROM accounts, accounts_opportunities, opportunities
    WHERE accounts.id = accounts_opportunities.account_id
    AND opportunities.id = accounts_opportunities.opportunity_id
    AND opportunities.deleted = 0

    in the MS SQL Server Management studio express

    SSY Australia PS 85 2008-03-20 00:00:00.000
    SSY Australia PS 85 2008-07-02 00:00:00.000
    SSY Australia PS 85 2008-05-06 00:00:00.000

    But when i enter it into Zucker Reports i get

    PS PS 85 20/03/2008 00:00
    PS PS 85 02/07/2008 00:00
    PS PS 85 06/05/2008 00:00

  9. #9
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Zucker Report Opportunities Break down

    Quote Originally Posted by nvdp2002
    This is what i get when i enter the query

    SELECT accounts.name, opportunities.name, opportunities.amount, opportunities. date_closed
    FROM accounts, accounts_opportunities, opportunities
    WHERE accounts.id = accounts_opportunities.account_id
    AND opportunities.id = accounts_opportunities.opportunity_id
    AND opportunities.deleted = 0

    in the MS SQL Server Management studio express

    SSY Australia PS 85 2008-03-20 00:00:00.000
    SSY Australia PS 85 2008-07-02 00:00:00.000
    SSY Australia PS 85 2008-05-06 00:00:00.000

    But when i enter it into Zucker Reports i get

    PS PS 85 20/03/2008 00:00
    PS PS 85 02/07/2008 00:00
    PS PS 85 06/05/2008 00:00
    Have you tried with an explicit JOIN query?
    What do you think the cookie monster eats ?

  10. #10
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default

    when i use the following query

    SELECT accounts.id, accounts.name, opportunities.name, opportunities.amount, opportunities. date_closed
    FROM accounts
    INNER JOIN accounts_opportunities
    ON accounts.id = accounts_opportunities.account_id
    INNER JOIN opportunities
    ON opportunities.id = accounts_opportunities.opportunity_id
    WHERE opportunities.deleted = 0

    I still get the same result

    PS PS 85 20/03/2008 00:00
    PS PS 85 02/07/2008 00:00
    PS PS 85 06/05/2008 00:00

    as apposed to

    SSY Australia PS 85 2008-03-20 00:00:00.000
    SSY Australia PS 85 2008-07-02 00:00:00.000
    SSY Australia PS 85 2008-05-06 00:00:00.000

    which is what im supposed to get.

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. zucker report + Sugar Crm = can't upload
    By alexlega in forum Help
    Replies: 6
    Last Post: 2009-10-08, 03:15 AM
  2. Error: Running zucker report Demo
    By visucr in forum Help
    Replies: 5
    Last Post: 2009-03-13, 02:53 PM
  3. zucker report + ireport: how to?
    By alexlega in forum Help
    Replies: 0
    Last Post: 2007-06-26, 09:31 PM
  4. Zucker Report problem
    By pravindab in forum Help
    Replies: 0
    Last Post: 2006-11-03, 05:03 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
  •