Home
Analytics
Help - Passing multiple parameters and values through URL without exceeds..
Evandro
I have a concatenated string with the all parameters and all values to make the URL and create a birt report.<br />
<br />
I have many parameters with many values each.<br />
<br />
But, URL exceeds the length and break the process.<br />
<br />
Example of code who make URL string(PHP):<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
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();
</pre>
<br />
I'm using Birt 2.5 and Viewer 2.5.0.<br />
<br />
Anyone can help me to create another way to pass all these parameters to Birt without exceeds the URL or using another method?<br />
<br />
Thanks!
Find more posts tagged with
Comments
kclark
You could use GET/POST requests to pass the string between reports. I'm working on an example for you now and will post it here soon.
Evandro
Thanks for helping, I search in web how i can use POST to pass parameters, but nothing was useful.
It's a form on php and user can use a multiselect box with many many parameters and i can't change that because rule of business.
I use GET, how can i use POST?
I'll be in waiting.
Thanks!
Evandro
Evandro
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="114984" data-time="1363038810" data-date="11 March 2013 - 02:53 PM"><p>
You could use GET/POST requests to pass the string between reports. I'm working on an example for you now and will post it here soon.<br /></p></blockquote>
<br />
<br />
???
kclark
Sorry for the late reply Evandro. I've attached a good example that <a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/user/24-clement-wong/'>Clement
Wong</a> sent my way. The rptdesign contains one parameter in the report to show that it has been passed to it. The post to the rptdesign is done with the following HTML<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<html>
<head>
<script>
//http://localhost:8080/birt/run?__report=Param.rptdesign&__format=HTML&NewParameter=xxxxxxxxxxxxxxxxxxxx
</script>
</head>
<body>
<form method="POST" target="_blank" action="/birt/run" accept-charset="utf-8">
<input type="hidden" name="__report" value="Param.rptdesign"></input>
<input type="hidden" name="__format" value="HTML"></input>
Parm:<TEXTAREA name="NewParameter" rows="10" cols="80" value="1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" width="500">
</TEXTAREA>
<br>
<input type="submit"></input>
</form>
</body>
</html>
</pre>
<br />
You need to make sure that you changehe URL to match your environment for this to work. Once the report has been generated you'll notice that the parameter is not in the URL. I tested this with a very long string in the text box.
Evandro
Thanks for reply.
I will test and check with my supervisor and i will post here the solution i get.
Thank you very much!
Evandro
My URL is like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
http://localhost:8080/viewer_250/run?__report=/var/www/urbem/gestaoRH/fontes/RPT/folhaPagamento/report/design/creditosBanco.rptdesign&db_driver=org.postgresql.Driver&db_host=172.16.30.181&db_port=2345&db_user=urbem&db_password=UrB3m&cod_acao=1514&exercicio=2012&db_conn_url=jdbc%3Apostgresql%3A%2F%2F172.16.30.181%3A2345%2Furbem_teste_migracao_mariana_0602&inCodGestao=4&inCodModulo=27&inCodRelatorio=6&stEntidade=&entidade=2&inCodPeriodoMovimentacao=504&stCompetencia=05%2F2012&stPeriodoInicial=01%2F05%2F2012&stPeriodoFinal=31%2F05%2F2012&cod_complementar=0&inCodConfiguracao=1&boAgruparLotacao=false&boQuebrarLotacao=false&boAgruparLocal=false&boQuebrarLocal=false&boAgruparAgencia=false&boQuebrarAgencia=false&stSituacao=ativos&codLocal=4%2C2%2C5%2C1%2C3%2C14%2C6%2C13%2C8%2C7%2C12%2C10%2C9%2C11&codLotacao=12%2C32%2C172%2C182%2C192%2C522%2C542%2C562%2C578%2C579%2C580%2C581%2C582%2C583%2C584%2C585%2C586%2C602%2C606%2C607%2C642%2C643%2C644%2C670%2C672%2C673%2C674%2C675%2C676%2C677%2C686%2C687%2C688%2C689%2C42%2C232%2C242%2C252%2C462%2C645%2C665%2C666%2C667%2C668%2C669%2C692%2C698%2C52%2C202%2C212%2C222%2C492%2C587%2C588%2C589%2C590%2C678%2C679%2C680%2C681%2C682%2C696%2C62%2C412%2C422%2C432%2C502%2C552%2C593%2C594%2C595%2C596%2C597%2C608%2C609%2C610%2C611%2C612%2C613%2C614%2C615%2C616%2C617%2C618%2C619%2C620%2C621%2C622%2C623%2C624%2C625%2C626%2C627%2C628%2C629%2C630%2C631%2C632%2C633%2C634%2C635%2C693%2C72%2C292%2C302%2C312%2C322%2C332%2C342%2C352%2C362%2C372%2C382%2C392%2C402%2C442%2C472%2C482%2C512%2C572%2C573%2C574%2C575%2C600%2C601%2C605%2C636%2C637%2C638%2C639%2C82%2C262%2C272%2C282%2C452%2C591%2C603%2C653%2C654%2C655%2C656%2C657%2C658%2C664%2C683%2C684%2C691%2C694%2C697%2C92%2C112%2C122%2C132%2C142%2C152%2C162%2C532%2C690%2C576%2C604%2C598%2C640%2C641%2C646%2C647%2C648%2C649%2C650%2C651%2C652%2C685%2C695%2C22%2C102%2C599&codBanco=1000%2C1001%2C1002%2C1003%2C1004%2C1005%2C1006%2C1007%2C1008%2C1009%2C1010%2C1011%2C1012%2C1013%2C1014%2C1015%2C1016%2C1017%2C1018%2C1019%2C1020%2C1021%2C1022%2C1023%2C1024%2C1025%2C1026%2C1027%2C1028%2C1029%2C1030%2C1031%2C1032%2C1033%2C1034%2C1035%2C1036%2C1037%2C1038%2C1039%2C1040%2C1265%2C1041%2C1042%2C1043%2C1044%2C1045%2C1046%2C1047%2C1048%2C1049%2C1270%2C1050%2C1051%2C1052%2C1053%2C1266%2C1054%2C1055%2C1268%2C1056%2C1267%2C1269%2C1057%2C1058%2C1059%2C1060%2C1061%2C1062%2C1063%2C1064%2C1065%2C1066%2C1067%2C1068%2C1069%2C1070%2C1071%2C1072%2C1073%2C1074%2C1075%2C1076%2C1077%2C1078%2C1079%2C1080%2C1081%2C1082%2C1083%2C1084%2C1085%2C1086%2C1087%2C1088%2C1089%2C1090%2C1091%2C1092%2C1093%2C1094%2C1095%2C1096%2C1097%2C1098%2C1099%2C1100%2C1101%2C1264%2C1102%2C1103%2C1104%2C1105%2C1106%2C1107%2C1108%2C1109%2C1110%2C1111%2C1112%2C1113%2C1114%2C1115%2C1116%2C1117%2C1118%2C1119%2C1120%2C1121%2C1122%2C1123%2C1124%2C1125%2C1126%2C1127%2C1128%2C1129%2C1130%2C1131%2C1132%2C1133%2C1134%2C1135%2C1136%2C1137%2C1138%2C1139%2C1140%2C1141%2C1142%2C1143%2C1144%2C1145%2C1146%2C1147%2C1148%2C1149%2C1150%2C1151%2C1152%2C1153%2C1154%2C1155%2C1156%2C1157%2C1158%2C1159%2C1160%2C1161%2C1162%2C1163%2C1164%2C1165%2C1166%2C1167%2C1168%2C1169%2C1170%2C1171%2C1172%2C1173%2C1174%2C1175%2C1176%2C1177%2C1178%2C1179%2C1180%2C1181%2C1182%2C1183%2C1184%2C1185%2C1186%2C1187%2C1188%2C1189%2C1190%2C1191%2C1192%2C1193%2C1194%2C1195%2C1196%2C1197%2C1198%2C1199%2C1200%2C1201%2C1202%2C1203%2C1204%2C1205%2C1206%2C1207%2C1208%2C1209%2C1210%2C1211%2C1212%2C1213%2C1214%2C1215%2C1216%2C1217%2C1218%2C1219%2C1220%2C1221%2C1222%2C1223%2C1224%2C1225%2C1226%2C1227%2C1228%2C1229%2C1230%2C1231%2C1232%2C1233%2C1234%2C1235%2C1236%2C1237%2C1238%2C1239%2C1240%2C1241%2C1242%2C1243%2C1244%2C1245%2C1246%2C1247%2C1248%2C1249%2C1250%2C1251%2C1252%2C1253%2C1254%2C1255%2C1256%2C1257%2C1258%2C1259%2C1260%2C1261%2C1262%2C1263%2C999&codAgencia=36%2C30%2C1008%2C39%2C1%2C38%2C26%2C19%2C1011%2C1010%2C20%2C31%2C40%2C11%2C15%2C2%2C1000%2C8%2C35%2C33%2C42%2C1009%2C32%2C37%2C44%2C43%2C34%2C6%2C41%2C5%2C1005%2C1007%2C9%2C10%2C1002%2C1006%2C16%2C1001%2C21%2C1003%2C24%2C25%2C1012%2C1004%2C23%2C28%2C18%2C4%2C14%2C12%2C13%2C7%2C3%2C22%2C27%2C17%2C29%2C999&__locale=pt_BR&__format=html
</pre>
<br />
<br />
<br />
<br />
Evandro
Thanks for reply.
I will test and check with my supervisor and i will post here the solution i get.
Thank you very much!
Evandro
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="115333" data-time="1363976256" data-date="22 March 2013 - 11:17 AM"><p>
Sorry for the late reply Evandro. I've attached a good example that <a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/user/24-clement-wong/'>Clement
Wong</a> sent my way. The rptdesign contains one parameter in the report to show that it has been passed to it. The post to the rptdesign is done with the following HTML<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<html>
<head>
<script>
//http://localhost:8080/birt/run?__report=Param.rptdesign&__format=HTML&NewParameter=xxxxxxxxxxxxxxxxxxxx
</script>
</head>
<body>
<form method="POST" target="_blank" action="/birt/run" accept-charset="utf-8">
<input type="hidden" name="__report" value="Param.rptdesign"></input>
<input type="hidden" name="__format" value="HTML"></input>
Parm:<TEXTAREA name="NewParameter" rows="10" cols="80" value="1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" width="500">
</TEXTAREA>
<br>
<input type="submit"></input>
</form>
</body>
</html>
</pre>
<br />
You need to make sure that you changehe URL to match your environment for this to work. Once the report has been generated you'll notice that the parameter is not in the URL. I tested this with a very long string in the text box.<br /></p></blockquote>
<br />
<br />
//
//<br />
<br />
<br />
Thanks again.<br />
<br />
This is my URL:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
http://localhost:8080/viewer_250/run?__report=/var/www/urbem/gestaoRH/fontes/RPT/folhaPagamento/report/design/creditosBanco.rptdesign&db_driver=org.postgresql.Driver&db_host=172.16.30.181&db_port=2345&db_user=urbem&db_password=UrB3m&cod_acao=1514&exercicio=2012&db_conn_url=jdbc%3Apostgresql%3A%2F%2F172.16.30.181%3A2345%2Furbem_teste_migracao_mariana_0602&inCodGestao=4&inCodModulo=27&inCodRelatorio=6&stEntidade=&entidade=2&inCodPeriodoMovimentacao=504&stCompetencia=05%2F2012&stPeriodoInicial=01%2F05%2F2012&stPeriodoFinal=31%2F05%2F2012&cod_complementar=0&inCodConfiguracao=1&boAgruparLotacao=false&boQuebrarLotacao=false&boAgruparLocal=false&boQuebrarLocal=false&boAgruparAgencia=false&boQuebrarAgencia=false&stSituacao=ativos&codLocal=4%2C2%2C5%2C1%2C3%2C14%2C6%2C13%2C8%2C7%2C12%2C10%2C9%2C11&codLotacao=12%2C32%2C172%2C182%2C192%2C522%2C542%2C562%2C578%2C579%2C580%2C581%2C582%2C583%2C584%2C585%2C586%2C602%2C606%2C607%2C642%2C643%2C644%2C670%2C672%2C673%2C674%2C675%2C676%2C677%2C686%2C687%2C688%2C689%2C42%2C232%2C242%2C252%2C462%2C645%2C665%2C666%2C667%2C668%2C669%2C692%2C698%2C52%2C202%2C212%2C222%2C492%2C587%2C588%2C589%2C590%2C678%2C679%2C680%2C681%2C682%2C696%2C62%2C412%2C422%2C432%2C502%2C552%2C593%2C594%2C595%2C596%2C597%2C608%2C609%2C610%2C611%2C612%2C613%2C614%2C615%2C616%2C617%2C618%2C619%2C620%2C621%2C622%2C623%2C624%2C625%2C626%2C627%2C628%2C629%2C630%2C631%2C632%2C633%2C634%2C635%2C693%2C72%2C292%2C302%2C312%2C322%2C332%2C342%2C352%2C362%2C372%2C382%2C392%2C402%2C442%2C472%2C482%2C512%2C572%2C573%2C574%2C575%2C600%2C601%2C605%2C636%2C637%2C638%2C639%2C82%2C262%2C272%2C282%2C452%2C591%2C603%2C653%2C654%2C655%2C656%2C657%2C658%2C664%2C683%2C684%2C691%2C694%2C697%2C92%2C112%2C122%2C132%2C142%2C152%2C162%2C532%2C690%2C576%2C604%2C598%2C640%2C641%2C646%2C647%2C648%2C649%2C650%2C651%2C652%2C685%2C695%2C22%2C102%2C599&codBanco=1000%2C1001%2C1002%2C1003%2C1004%2C1005%2C1006%2C1007%2C1008%2C1009%2C1010%2C1011%2C1012%2C1013%2C1014%2C1015%2C1016%2C1017%2C1018%2C1019%2C1020%2C1021%2C1022%2C1023%2C1024%2C1025%2C1026%2C1027%2C1028%2C1029%2C1030%2C1031%2C1032%2C1033%2C1034%2C1035%2C1036%2C1037%2C1038%2C1039%2C1040%2C1265%2C1041%2C1042%2C1043%2C1044%2C1045%2C1046%2C1047%2C1048%2C1049%2C1270%2C1050%2C1051%2C1052%2C1053%2C1266%2C1054%2C1055%2C1268%2C1056%2C1267%2C1269%2C1057%2C1058%2C1059%2C1060%2C1061%2C1062%2C1063%2C1064%2C1065%2C1066%2C1067%2C1068%2C1069%2C1070%2C1071%2C1072%2C1073%2C1074%2C1075%2C1076%2C1077%2C1078%2C1079%2C1080%2C1081%2C1082%2C1083%2C1084%2C1085%2C1086%2C1087%2C1088%2C1089%2C1090%2C1091%2C1092%2C1093%2C1094%2C1095%2C1096%2C1097%2C1098%2C1099%2C1100%2C1101%2C1264%2C1102%2C1103%2C1104%2C1105%2C1106%2C1107%2C1108%2C1109%2C1110%2C1111%2C1112%2C1113%2C1114%2C1115%2C1116%2C1117%2C1118%2C1119%2C1120%2C1121%2C1122%2C1123%2C1124%2C1125%2C1126%2C1127%2C1128%2C1129%2C1130%2C1131%2C1132%2C1133%2C1134%2C1135%2C1136%2C1137%2C1138%2C1139%2C1140%2C1141%2C1142%2C1143%2C1144%2C1145%2C1146%2C1147%2C1148%2C1149%2C1150%2C1151%2C1152%2C1153%2C1154%2C1155%2C1156%2C1157%2C1158%2C1159%2C1160%2C1161%2C1162%2C1163%2C1164%2C1165%2C1166%2C1167%2C1168%2C1169%2C1170%2C1171%2C1172%2C1173%2C1174%2C1175%2C1176%2C1177%2C1178%2C1179%2C1180%2C1181%2C1182%2C1183%2C1184%2C1185%2C1186%2C1187%2C1188%2C1189%2C1190%2C1191%2C1192%2C1193%2C1194%2C1195%2C1196%2C1197%2C1198%2C1199%2C1200%2C1201%2C1202%2C1203%2C1204%2C1205%2C1206%2C1207%2C1208%2C1209%2C1210%2C1211%2C1212%2C1213%2C1214%2C1215%2C1216%2C1217%2C1218%2C1219%2C1220%2C1221%2C1222%2C1223%2C1224%2C1225%2C1226%2C1227%2C1228%2C1229%2C1230%2C1231%2C1232%2C1233%2C1234%2C1235%2C1236%2C1237%2C1238%2C1239%2C1240%2C1241%2C1242%2C1243%2C1244%2C1245%2C1246%2C1247%2C1248%2C1249%2C1250%2C1251%2C1252%2C1253%2C1254%2C1255%2C1256%2C1257%2C1258%2C1259%2C1260%2C1261%2C1262%2C1263%2C999&codAgencia=36%2C30%2C1008%2C39%2C1%2C38%2C26%2C19%2C1011%2C1010%2C20%2C31%2C40%2C11%2C15%2C2%2C1000%2C8%2C35%2C33%2C42%2C1009%2C32%2C37%2C44%2C43%2C34%2C6%2C41%2C5%2C1005%2C1007%2C9%2C10%2C1002%2C1006%2C16%2C1001%2C21%2C1003%2C24%2C25%2C1012%2C1004%2C23%2C28%2C18%2C4%2C14%2C12%2C13%2C7%2C3%2C22%2C27%2C17%2C29%2C999&__locale=pt_BR&__format=html
</pre>
<br />
<br />
i will send you my rptdesing.<br />
<br />
Then i need to add all the parameters of rptdesing in this "PARM:"?<br />
<br />
Thanks!
kclark
Can you post some of the PHP showing how you're passing the data to the POST?
Evandro
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="115338" data-time="1363982882" data-date="22 March 2013 - 01:08 PM"><p>
Can you post some of the PHP showing how you're passing the data to the POST?<br /></p></blockquote>
<br />
<br />
<br />
<br />
I will post Monday because today is Friday and i'm not working right now.<br />
<br />
Thanks and have a nice weekend.
Clement Wong
Evandro,<br />
<br />
For each of your 26 parameters in your report, you will need to have a separate INPUT element.<br />
<br />
Maybe something like this as one example:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><?php
echo '<input type="hidden" name="db_host" value="' . htmlspecialchars($Con->stHost) . '" />'."\n";
?></pre>
Evandro
<blockquote class='ipsBlockquote' data-author="'Clement Wong'" data-cid="115340" data-time="1363985959" data-date="22 March 2013 - 01:59 PM"><p>
Evandro,<br />
<br />
For each of your 26 parameters in your report, you will need to have a separate INPUT element.<br />
<br />
Maybe something like this as one example:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><?php
echo '<input type="hidden" name="db_host" value="' . htmlspecialchars($Con->stHost) . '" />'."\n";
?></pre></p></blockquote>
<br />
Clement,<br />
<br />
I changed to send parameters like you said, but what i need to change in rpt design?<br />
<br />
my rpt receive the parameters which in URL.
Evandro
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="115338" data-time="1363982882" data-date="22 March 2013 - 01:08 PM"><p>
Can you post some of the PHP showing how you're passing the data to the POST?<br /></p></blockquote>
<br />
Helo kclark,<br />
<br />
I changed like clement show me, but in rptdesign what i need change?<br />
<br />
Thanks
Evandro
<pre class='_prettyXprint _lang-auto _linenums:0'>
$stHtml = "<html>";
$stHtml.= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">";
$stHtml.= "<head>";
$stHtml.= "<title> " . $this->getTitulo() . "</title>";
$stHtml.= "<script language=\"JavaScript1.2\" src=\"../../../../../../gestaoAdministrativa/fontes/javaScript/scriptaculous/prototype.js\" type=\"text/javascript\"></script>";
$stHtml.= "<script language=\"JavaScript1.2\" src=\"../../../../../../gestaoAdministrativa/fontes/javaScript/scriptaculous/scriptaculous.js\" type=\"text/javascript\"></script>";
$stHtml.= "<script language=\"JavaScript1.2\" src=\"../../../../../../gestaoAdministrativa/fontes/javaScript/jquery.js\" type=\"text/javascript\"></script>";
$stHtml.= "<link href=\"../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/CSS/stylos_ns.css\" rel=\"stylesheet\" type=\"text/css\" />";
$stHtml.= "<link href=\"../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/CSS/birt.css\" rel=\"stylesheet\" type=\"text/css\" />";
$stHtml.= "<style> body { background-color:#fff;}</style>";
$stHtml.= "<script> \n";
$stHtml.= " function inverteFrames(){ \n";
if($this->getPopup()){
$stHtml .= "document.getElementById('iframe_birt_proc').style.display='none';\n";
$stHtml .= "document.getElementById('iframe_birt').style.display='';\n";
}else{
$stHtml .= "parent.frames['telaPrincipal'].document.getElementById('iframe_birt_proc').style.display='none';\n";
$stHtml .= "parent.frames['telaPrincipal'].document.getElementById('iframe_birt').style.display='';\n";
}
$stHtml .= "}\n";
$stHtml .= "
function shrinkFrame(){
jQuery('#frOculto',parent.document).attr('rows','0,*,0,0');
jQuery('#frOculto #frTela',parent.document).attr('cols','0,*');
jQuery('#imgFechaPreview',parent.frames[2].document).attr('src','../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/btnEstornar32.png');
jQuery('#imgFechaPreview',parent.frames[2].document).attr('title','Voltar ao Urbem ( Fechar Preview )!');
}
jQuery().ready(function(){
shrinkFrame();
jQuery('#imgFechaPreview',parent.frames[2].document).toggle(
function(){
jQuery('#frOculto',parent.document).attr('rows','77,*,22,0');
jQuery('#frOculto #frTela',parent.document).attr('cols','180,*');
jQuery('#imgFechaPreview',parent.frames[2].document).attr('src','../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/btnRelatorio_32.png');
jQuery('#imgFechaPreview',parent.frames[2].document).attr('title','Mostrar Ambiente de Visualiza??o!');
url = jQuery('#imgFechaPreview',parent.frames[2].document).parent().attr('href');
if(url != '#'){
window.location.href = url;
}
return false;
},
function(){
shrinkFrame();
return false;
}
);
});
</script>
";
$stHtml.= "</head>";
$stHtml.= "<body>";
$stHtml.= "<table width='100%' border=0>";
$stHtml.= " <tr>";
$stHtml.= " <td class='titulocabecalho' height='5' width='100%'>";
$stHtml.= " <table cellspacing=0 cellpadding=0 class='titulocabecalho_gestao' width='100%'>";
$stHtml.= " <tr>";
$stHtml.= " <td width='80%'>";
//$stHtml .=" " . $stTitulo . " ";
$stHtml.= " Pr?-visualiza??o de Relat?rio";
$stHtml.= " </td>";
$stHtml.= " <td width='20%' class='versao'> </td>";
$stHtml.= " </tr>";
$stHtml.= " </table>";
$stHtml.= " </td>";
$stHtml.= "</tr>";
$stHtml.= "</table>";
//input with parameters
$stHtml.= "<form method=\"POST\" action=\"/viewer_" . str_replace('.','',$this->getVersaoBirt()) . "/run?\" accept-charset=\"utf-8\">";
foreach($this->arParametros as $parametro) {
$stHtml.= "<input type=\"hidden\" name=\"" .$parametro[0]. "\" value=\"".htmlspecialchars($parametro[1])."\"></input>";
}
$stHtml.="</form>";
$stHtml.= " <div id=\"conteudo\">";
$stHtml.= " <div id=\"incTopo\">";
$stHtml.= " <ul id=\"menu\">";
if ($this->getExportaExcel() || $this->getExportaWord()){
if ( $this->getExportaWord() ){
$stHtml.= " <li><a href=\"$stBirtDoc\" target=\"iframe_birt\"><img src=\"../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/btnDOC_32.png\" alt=\"Visualizar como Documento do Word\" border=\"0\" /></a></li>";
}
if( $this->getExportaExcel() ){
$stHtml.= " <li><a href=\"$stBirtXls\" target=\"iframe_birt\"><img src=\"../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/btnXLS_32.png\" alt=\"Visualizar como Documento do Excel\" border=\"0\" /></a></li>";
}
}
$stHtml.= " <li><a href=\"$stBirtPdf\" target=\"iframe_birt\"><img src=\"../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/btnPDF_32.png\" alt=\"PDF\" border=\"0\" /></a></li>";
$stHtml.= " <li><a href=\"" . ($this->getReturnURL() == '' ? '#' : URBEM_ROOT_URL . substr($this->getReturnURL(),18)) . "\"><img id=\"imgFechaPreview\" border=\"0\" /></a></li>";
$stHtml.= " </ul>";
$stHtml.= " <dl>";
$stHtml.= " <dt>" . $stTitulo . "</dt>";
//$stHtml .=" <dd class=\"defPrefeitura\">Usu?rio: " . sessao->nomCgm . "</dd>";
//$stHtml .=" <dd class=\"defExercicio\">Exercicio: " . sessao->exercicio . " </dd>";
$stHtml.= " <dd class=\"defData\">Data: " . date("d/m/y - H:i") . "</dd>";
$stHtml.= " </dl>";
$stHtml.= " </div>\n";
$stHtml.= " <div id=\"corpo\">\n";
$stHtml.= " <iframe style=\"border:none;\" src='../../../../../../gestaoAdministrativa/fontes/PHP/framework/birt/instancias/Processando.php' id='iframe_birt_proc' name='iframe_birt_proc' width='98%' height='85%' longdesc='IFrame com Relatorio'></iframe>\n";
$stHtml.= " <iframe onLoad=\"inverteFrames();\" style=\"border:none;display:none;\" src='$stBirt' id=\"iframe_birt\" name=\"iframe_birt\" width=\"98%\" height=\"85%\" longdesc=\"IFrame com Relatorio\" ></iframe>\n";
$stHtml.= " </div>\n";
$stHtml.= " </div>";
$stHtml.= "</body>";
$stHtml.= "</html>";
// exibe debug, se solicitado e se urbem em modo dev
if ( constant('ENV_TYPE') == 'dev' && isset($this->stDebug) ) {
if($this->getDebug() == 'parcial' ){
$this->debug(); // 1 = parcial
}elseif($this->getDebug() == 'completo' ){
$this->debug($stBirtPdf);
}
}
if ($this->getFormato() != "pdf"){
echo $stHtml;
} elseif ($this->getDownload() == true) {
$stHtmlPdf = "<html>";
$stHtmlPdf .= "<head>";
$stHtmlPdf .= "<script language=\"JavaScript1.2\" src=\"../../../../../../gestaoAdministrativa/fontes/javaScript/jquery.js\" type=\"text/javascript\"></script>";
$stHtmlPdf .= "<script language=\"JavaScript1.2\" src=\"../../../../../../gestaoAdministrativa/fontes/javaScript/genericas.js\" type=\"text/javascript\"></script>";
$stHtmlPdf .= "</head>";
$stHtmlPdf .= "<body onload='LiberaFrames(true,false);'>";
$stHtmlPdf .= "<iframe src='$stBirt' style=\"border:none;display:none;\" id=\"iframe_birt\" name=\"iframe_birt\" width=\"98%\" height=\"85%\" longdesc=\"IFrame com Relatorio\" ></iframe>\n";
$stHtmlPdf .= "</body>";
$stHtmlPdf .= "</html>";
echo $stHtmlPdf;
</pre>
<br />
<br />
<br />
This is my code <blockquote class='ipsBlockquote' ><p>kclark</p></blockquote>.
Clement Wong
<blockquote class='ipsBlockquote' data-author="'Evandro'" data-cid="115487" data-time="1364477988" data-date="28 March 2013 - 06:39 AM"><p>
Clement,<br />
<br />
I changed to send parameters like you said, but what i need to change in rpt design?<br />
<br />
my rpt receive the parameters which in URL.<br /></p></blockquote>
<br />
You don't need to change anything in your .rptdesign.<br />
<br />
When you use the <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/deploy/viewerUsage.php'>sample
BIRT Viewer</a> and "run" your report, you can pass the parameters to your report design as a GET or POST.
Evandro
<blockquote class='ipsBlockquote' ><p>Clement Wong, kclark</p></blockquote>
<br />
<br />
Hi guys.<br />
I made a form with post and put the URL string in 'action' and set the 'target' with my iframe and works fine.<br />
<br />
<br />
There is the code with my solution:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
$stHtmlNova.= " <iframe style=\"border:none;\" src='../../../../../../gestaoAdministrativa/fontes/PHP/framework/birt/instancias/Processando.php' id='iframe_birt_proc' name='iframe_birt_proc' width='98%' height='85%' longdesc='IFrame com Relatorio'></iframe>\n";
$stHtmlNova.= " <iframe onLoad=\"inverteFrames();\" style=\"border:none;display:none;\" src'about:blank' id=\"iframe_birt\" name=\"iframe_birt\" width=\"98%\" height=\"85%\" longdesc=\"IFrame com Relatorio\" >$stForm</iframe>\n";
$stHtmlNova.= "</div>";
$stHtmlNova .= "<form id=\"birtreport\" name=\"relatorio\" method=\"post\" target=\"iframe_birt\" action=\"" . $stBirt . "\" accept-charset=\"utf-8\">";
$stHtmlNova .= "<input id=\"geraBirt\" type=\"submit\" value=\"GerarRelatorio\" </input>";
$stHtmlNova .=" </form>";
</pre>
<br />
Thanks for all help and support.<br />
<br />
.o/<br />
Evandro
<blockquote class='ipsBlockquote' data-author="'Clement Wong'" data-cid="115539" data-time="1364580712" data-date="29 March 2013 - 11:11 AM"><p>
You don't need to change anything in your .rptdesign.<br />
<br />
When you use the <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/deploy/viewerUsage.php'>sample
BIRT Viewer</a> and "run" your report, you can pass the parameters to your report design as a GET or POST.<br /></p></blockquote>
<br />
<br />
see my solution!<br />
<br />
thanks.
Evandro
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="115338" data-time="1363982882" data-date="22 March 2013 - 01:08 PM"><p>
Can you post some of the PHP showing how you're passing the data to the POST?<br /></p></blockquote>
<br />
<br />
Hey see my solution!<br />
<br />
Thanks for helping me.