Link to home
Start Free TrialLog in
Avatar of cyrilvictor
cyrilvictor

asked on

passing parameter from java script to crystal report

hello
    i want pass a parameter from java script to crystal report.   pls c the codeing where i have underlined.plshelp me
         the codeing is as follows:

  <?php

 
   $code = "<html>";    
                  $code .= "\n\t<head>";
                  $code .= "\n\t<script language='javascript'>";
               
            $code .= "\n\tfunction BtnClick(par) {";
            $code .= "\n\tswitch (par) {";
            
                  
            $code .= "\n\tcase 'Report' :";
                                $code .= "\n\tlocation.href = './hcfa.rpt';";
                                     ----------------------------------------       
                     $code .= "\n\tbreak;";                   
            $code .= "\n\tdefault:";
            $code .= "\n\talert(par); }";  
            $code .= "\n\t}";
            $code .= "\n\t</script>";
            $code .= "\n\t</head>";
       
           
             
         $code .= "</table></td></tr></table><table border=0  cellpadding=0 cellspacing=0 width=100%><tr><td width=100%><table  width=100%><tr><td width=50%>&nbsp;</td><td align=center>";
             $code .= "<td align=center><img src=./img/report.png name= Export alt='Export HCFA' onclick='BtnClick(\"Report\")'></td>";
         $code .= "</td></tr></table></td></tr></table></center>";
     
      $code .="</html>\n";
 echo $code;
 
Avatar of frodoman
frodoman
Flag of United States of America image

Looks like you're calling an unmanaged report?  You should be able to just append to the URL:

$code.= "\n\tlocation.href = './hcfa.rpt?promptex0=paramvalue';";
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial