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

Thread: ZuckerReports Query with Parameters

  1. #1
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default ZuckerReports Query with Parameters

    Hi to all,
    I try ZuckerReports, and I wnat to parameter a query SQL,
    the correct syntax in the query editor, for a parameter is:

    $name_of_parameters

    If the response is yes, I've a problem, when I run a report
    with parameters I receive an error SQl, and the report doesn't
    work.

    Can anyone write me a working example with parameters?
    I use reports inline, without any template, there simple sum or
    count.

    Any ideas

  2. #2
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: ZuckerReports Query with Parameters

    This is the output error:

    Output

    Error while running Report
    Query: SELECT Sum(`opportunities_cstm`.`consumo_c`) FROM `opportunities` INNER JOIN `opportunities_cstm` ON `opportunities_cstm`.`id_c` = `opportunities`.`id` WHERE `opportunities`.`date_closed` BETWEEN '2009-01-01' AND '2009-12-31' AND `opportunities`.`sales_stage` = $FORNITORE AND `opportunities`.`deleted` = 0;
    MySQL error :

    $FORNITORE is the parameter... whre I'm wrong?

  3. #3
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: ZuckerReports Query with Parameters

    Did you created the query/report parameter with name "FORNITORE "?

    If yes, are you using Friendly Name or Default Name of the parameter? You should use Default Name.

    Put single quotes before and after the parameter

  4. #4
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: ZuckerReports Query with Parameters

    Hi Siva,
    thanks for your time, yes I made the parameter
    FORNITORE and Friendly Name and Default Name are
    both FORNITORE, when I put

    '$FORNITORE'

    in the query the output was blank, it seems that Zucker can't
    recognize parameters.

    My installation is Sugar5.2CE and Zucker 1.10CE (fixed)

    Other ideas?

  5. #5
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: ZuckerReports Query with Parameters

    What type of parameter you have created? Is it Drop-Down List?

    If yes, did you selected the value in dropdown list while running report?

  6. #6
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: ZuckerReports Query with Parameters

    Yes is it a droplist, and when I launch the report,
    I cannot see the dropdown list to select a value...

  7. #7
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: ZuckerReports Query with Parameters

    you need to add your parameter 'FORNITORE' as a filter to the report. You can find "New Filter" sub tab in the detailview of the report. You can add filters here

  8. #8
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: ZuckerReports Query with Parameters

    There's something strange when I save the parameter,
    I've attached the screenshot...

    In the table zucker_reportparamaters I see the "default" parameters like ACCOUNT_ID
    CONTACT_ID, that have the column RANGE and RANGE_OPTIONS full of data, but my
    new paramaters is NULL and NULL (see screenshot)

    I don't know if this can help
    Attached Images Attached Images   

  9. #9
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: ZuckerReports Query with Parameters

    The type of other parameters are different. Your parameter's type is dropdown list. So don't worry.

  10. #10
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: ZuckerReports Query with Parameters

    sorry but when I edit my Reports, I can't see
    the Filters Tab, here's a screen
    Attached Images Attached Images  

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. Parameters on ZuckerReports
    By enicot in forum Developer Help
    Replies: 2
    Last Post: 2009-01-21, 03:55 PM
  2. Replies: 0
    Last Post: 2009-01-15, 04:56 PM
  3. Query parametrizzate con ZuckerReports
    By domenico1983 in forum Italiano
    Replies: 1
    Last Post: 2008-10-24, 03:55 PM
  4. Parameters in ZuckerReports
    By cgarcia in forum Help
    Replies: 0
    Last Post: 2008-07-29, 11:33 AM
  5. Replies: 1
    Last Post: 2008-06-25, 03:07 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
  •