Jump to content
We've recently updated our Privacy Statement, available here ×

rodnikosh

Members
  • Posts

    16
  • Joined

  • Last visited

Community Answers

  1. rodnikosh's post in add Combobox/list/dropdown parameter to Ireport report was marked as the answer   
    i solved the problem. it turns out zuckerreport is based on jasperreport server and therefore can add input controls too.
    The solution is to create the "city_combobox" parameter as a string parameter and leave the query as is , like the above example i gave. thats it for the IReport.
    in zuckerreport, add a parameter that its "Default Parameter Name" named city_combobox.
    for a dropdown parameter choose a type of "user-defined Query" and fill the “Parameter Settings” and “User-Defined Query” fields with a query that will fill the dropdown with a list of values, for example:
    SELECT DISTINCT
    leads.primary_address_city AS leads_primary_address_city
    FROM
    leads leads
    if you can't see the  “Parameter Settings” and “User-Defined Query” fields (in the new version of zuckerreport they are hidden), then
    The code is needed to be added manually in the editview code of zuckerreport.
    Add this code in modules/zr2_ReportParameter/metadata/editviewdefs.php :
    5 =>
            array (
                0 => 'range_options',
      ),
    then you'll see the hidden fields.
    Create a new template using “jasperReports Template” on the menu, the template is actually the report:
    a. Choose a name for the template and choose the jrxml file of the report (from local computer where the Ireport is).
    b. Choose PDF.Excel and HTML.
    c. Save
     
    Create a new Parameter binding between the report and the parameter:
    a. Push “Create”
    b. The parameter name has to be the exact parameter name in the IReport.
    c. Choose the report and the parameter and no need to choose “Bind to module”
    Copy the .jasper file of the report into custom/zuckerreports2/resources in SugarCRM.
    Go to “On demand reporting”, choose the report and the parameter is supposed to show.
    There you go! :)
     
×
×
  • Create New...