Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Using POST to pass parameters to birt instead GET
Using POST to pass parameters to birt instead GET [message #1021693] Wed, 20 March 2013 14:26 Go to next message
Evandro Melos is currently offline Evandro MelosFriend
Messages: 4
Registered: March 2013
Location: Porto Alegre, Brazil
Junior Member
I need a example how i use POST to send parameters and values to birt, i have many parameters with many values and my URL are too big.

Anyone can help me?

Thanks.
Re: Using POST to pass parameters to birt instead GET [message #1022402 is a reply to message #1021693] Thu, 21 March 2013 19:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you try using a form with post as described in this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=125125

Make sure use the exact report parameter names inside the form.

Re: Using POST to pass parameters to birt instead GET [message #1022783 is a reply to message #1022402] Fri, 22 March 2013 14:13 Go to previous message
Evandro Melos is currently offline Evandro MelosFriend
Messages: 4
Registered: March 2013
Location: Porto Alegre, Brazil
Junior Member
I can't do that, my code is like this:


if ( $this->getVersaoBirt() ) {
           $stBirt = "http://" . $http_host . ":".constant('BIRT_PORT')."/viewer_" . str_replace('.','',$this->getVersaoBirt()) . "/";
        } else {
            $stBirt = "http://" . $http_host . ":".constant('BIRT_PORT')."/viewer/";
        }
        $stBirt.= "run?";
        // adiciona nome do rpt - (Add a name to rpt)
        
        //$stBirt .= "reportLayout=" . $stReportLayout;
        $stBirt.= "__report=" . realpath($stBirtLayoutsFolder . $stReportLayout);
        //        $stBirt .= "&" . sessao->id;
        
        // conexao - (connection )
        $stBirt.= "&db_driver=" . urlencode('org.postgresql.Driver') . "";
        $stBirt.= "&db_host=" . urlencode($Con->stHost);
        $stBirt.= "&db_port=" . urlencode($Con->inPort);
        $stBirt.= "&db_user=" . urlencode($Con->stUser);
        $stBirt.= "&db_password=" . urlencode($Con->stPassWord);
        $stBirt.= "&cod_acao=" . Sessao::read('acao');
        $stBirt.= "&exercicio=" . Sessao::getExercicio();
        $stBirt.= "&db_conn_url=" . urlencode("jdbc:postgresql://" . $Con->stHost . ":" . $Con->inPort . "/" . $Con->stDbName . "");

        // varre parametros - (scan parameters)
        foreach($this->arParametros as $parametro) {
            $stBirt.= "&" . $parametro[0] . "=" . urlencode($parametro[1]);

        }
        // formatação numérica para valores na moeda brasileira - (formatting to Brazilian currency )
        $stBirt.= "&__locale=pt_BR";
       
        // formato - (format)
        $stBirtPdf.= $stBirt . "&__format=pdf";
        $stBirtDoc.= $stBirt . "&__format=doc";
        $stBirtXls.= $stBirt . "&__format=xls";
        $stBirt.= "&__format=" . $this->getFormato();


I need to change the way i concatenate parameters and values,
because the URL exceeds the limit.


Thanks.
Previous Topic:parameter values
Next Topic:setting filter in javascript
Goto Forum:
  


Current Time: Fri Mar 29 05:21:59 GMT 2024

Powered by FUDForum. Page generated in 0.01870 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top