Results 1 to 7 of 7

Thread: Zucker report parameters

  1. #1
    kavita is offline Member
    Join Date
    Apr 2009
    Posts
    16

    Question Zucker report parameters

    as per my project need.. [in jasper report template] i want to provide parameter to report.

    scenario :With the help of Parameter Binding in Zucker reports i have made two combo box .. when i select option from first combo , options related to first combo should be displayed in second combo (from database).I tried this by writing a user-defined query in the second parameters edit view but im not getting the output.

    eg first combo has country like India,China,etc .Then in second combo states of the country selected should be displayed in dropdown list .
    Suppose i select India then states under India like Rajasthan, Punjab, Maharashtra etc should be displayed in the second combos dropdown list.

    u have any solution for this..
    Plzzzzzzzzzz help.

    reply.
    Last edited by kavita; 2009-04-08 at 06:07 AM.

  2. #2
    genius786's Avatar
    genius786 is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Karachi, Pakistan
    Posts
    131

    Smile Re: Zucker report parameters

    Hi,

    You have to make changes in code to make this types of combo boxes.


    Best regards,
    SARFARAZ AHMED KHAN
    Karachi, Pakistan
    skype: genius_crystal
    genius_crystal@hotmail.com
    92-314-2595624

  3. #3
    kavita is offline Member
    Join Date
    Apr 2009
    Posts
    16

    Default Re: Zucker report parameters

    Thank you for the reply..but, i have already created the combo box through parameter binding option in zucker reports...i want the dynamic parameter of the first combo box so as to populate the second combo box with the filtered values..plz help

  4. #4
    elsadsis is offline Junior Member
    Join Date
    Apr 2009
    Posts
    1

    Default Re: Zucker report parameters

    Oh!!oh!!oh!!oh!!oh!!oh!!oh!!oh!!oh!!oh!!oh!!oh!!oh !!

  5. #5
    genius786's Avatar
    genius786 is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Karachi, Pakistan
    Posts
    131

    Smile Re: Zucker report parameters

    Hi,

    I told you it is not possible, or if you want to do you have to change in code.


    Best regards,
    SARFARAZ AHMED KHAN
    Karachi, Pakistan
    skype: genius_crystal
    genius_crystal@hotmail.com
    92-314-2595624

  6. #6
    alewin is offline Junior Member
    Join Date
    May 2009
    Posts
    1

    Default Re: Zucker report parameters

    That is easy, you have to use javascript. Here's an example of what I did loading content for my installations combo based on a textbox with the account. You need to add the code in the correspondent php file. Note that the method named addEvent is not in the code because is in my funciones.js file.
    I have added this code to the display() method in the editview. You can use jquery to simplify.
    Cheers.
    echo '<script src="include/javascript/funciones.js" type="text/javascript" ></script>';
    echo '
    <script type="text/javascript">
    function loadInstalations(){
    loadForAccount("getInstalaciones")
    }
    function loadForAccount(fn){
    var parametros = new Array(document.getElementById("account_id").value) ;
    ServerRequest("handleRequest.php", fn, parametros);
    }
    function retornoRequest(respXML){
    var root = respXML.firstChild;
    if(root!=null){
    switch(root.nodeName){
    case "instalaciones":
    procesarRetorno(root, "instalacion_c", "instalacion");
    break;
    }
    }
    }
    function procesarRetorno(root, htmlElement, xmlElement){
    var s = document.getElementById(htmlElement);
    clearSelect(s);
    if(root.hasChildNodes()){
    var list = root.getElementsByTagName(xmlElement);
    if(list!=null){
    for(i=0; i<list.length; i++){
    addToCombo(htmlElement, list.item(i).childNodes[0].childNodes[0].nodeValue, list.item(i).childNodes[1].childNodes[0].nodeValue);
    }
    }
    }
    }
    function clearSelect(select){
    var largo = select.length;
    for(i=0; i<largo; i++){
    select.removeChild(select.item(0));
    }
    }
    function addToCombo(combo, valor, texto){
    var select = document.getElementById(combo);
    var option = document.createElement("OPTION");
    option.value = valor;
    option.text = texto;
    try{
    select.add(option, null);
    }
    catch(ex){
    select.add(option);
    }
    }
    var objInstalacion = document.getElementById("instalacion_c");
    addEvent(objInstalacion,loadInstalations, "onfocus");
    </script>';

  7. #7
    kaisar is offline Senior Member
    Join Date
    Mar 2009
    Posts
    24

    Default Re: Zucker report parameters

    2 kavita: Try to create 1 bind parameter.
    For example, in your combo: India, Rajasthan
    then
    India, Mumbai
    then
    India, Punjab

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Parameters in zucker reports
    By vinaykimi in forum Help
    Replies: 3
    Last Post: 2009-08-19, 03:25 AM
  2. Replies: 2
    Last Post: 2008-10-30, 10:55 AM
  3. Dynamic parameters in Report
    By jjprabhu in forum Help
    Replies: 1
    Last Post: 2008-07-03, 09:32 AM
  4. jasper report or zucker report for dummies
    By sugarcare in forum General Discussion
    Replies: 0
    Last Post: 2006-11-08, 06:16 AM
  5. bind parameters in zucker reports
    By aheuermann in forum Help
    Replies: 2
    Last Post: 2006-07-01, 10:16 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
  •