Results 1 to 4 of 4

Thread: Report result/data/query

  1. #1
    neel1154's Avatar
    neel1154 is offline Sugar Community Member
    Join Date
    May 2010
    Location
    Pune, Maharashtra, India
    Posts
    301

    Default Report result/data/query

    Hi Guyz,

    I have a report created on Pro 6.5.13.

    It gives some contacts based on some filters, works totally fine in reports.

    I want to get either its query or its fetched data suppose like contact ids. Is this possible?

  2. #2
    hats Guest

    Default Re: Report result/data/query

    Hi,

    If I am not getting it wrong, then you should get query with every report generated in sugarcrm Pro.

    You just have to tick or check the "Show Query" box on report details page and it will be displayed right after the result.

    If you need something different then can you please elaborate more..??

    Cheers.

  3. #3
    neel1154's Avatar
    neel1154 is offline Sugar Community Member
    Join Date
    May 2010
    Location
    Pune, Maharashtra, India
    Posts
    301

    Default Re: Report result/data/query

    Oh, my bad.

    I forgot to mention, I want to get it in my code, not on UI of Report.

    I am able to get these details using "get_report_entries" API, but I want to try without using this API.

    Quote Originally Posted by hats View Post
    Hi,

    If I am not getting it wrong, then you should get query with every report generated in sugarcrm Pro.

    You just have to tick or check the "Show Query" box on report details page and it will be displayed right after the result.

    If you need something different then can you please elaborate more..??

    Cheers.

  4. #4
    hats Guest

    Default Re: Report result/data/query

    Hi neel,

    As you have mentioned, you used API to got the result. Are you using it for external website ?

    Because if you want to use the query inside sugar instance, then I have tried using jquery and its showing up. You have to edit the report and check "Show query" and then

    save and run.

    This is in jquery, so you can post it to any php file inside or outside the sugar instance using ajax.

    Go to sugarcrm root folder->modules->Reports->Report.php

    and paste the following code in function Report on line 121 :

    if (isset($_REQUEST['run_query']) && ($_REQUEST['run_query'] == 0)) {
    echo $showRepQuery = <<<BOC
    <script>
    $(document).ready(function() {
    var query = $("#query_table tbody tr:eq(1)>td").text();
    alert(query);
    });
    </script>
    BOC;
    You can extract multiple queries using jquery function .each(). Hope this would help.

    Cheers.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2013-01-01, 12:49 PM
  2. help storing query result
    By japtone in forum Developer Help
    Replies: 12
    Last Post: 2011-03-23, 10:43 PM
  3. How to add sql query in view.list.php in search result ?
    By bharat12345 in forum Developer Help
    Replies: 0
    Last Post: 2010-08-05, 03:41 PM
  4. Access COUNT query result?
    By madmat in forum Developer Help
    Replies: 3
    Last Post: 2008-08-08, 03:26 PM
  5. Replies: 1
    Last Post: 2006-08-03, 11: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
  •