Grettings,I have a table “Consulta”, when I insert a new record, I call a JasperReport with in a .php script.
1st. Problem:The report shows correctly in the self tab, but i want to show in a new browser tab (_bank), and in the self shows the list page.This is my code: Server Events → Table-Specific → Common → Row_Inserted
2nd Problem:The table has a 3 details table, “receta”, “imagenes”,“examenes”. Every detail have a report pdf. I need to shows 3 reports in 3 _blank page browser.I try to use 3 senetences terminate.This is my code: Server Events → Table-Specific → Common → Row_Inserted
I resolve my second problem:1.- No use terminte in Server Event-> Table Specific-> Common-> Row_Inserted.2.- Use a Hyperlink field (for my case the field ID).
HREF Field: id
Original field value: (checked)
Target: _blank
Prefix: JasperPHP/rptconsulta.php?consulta= (my external .php file)3.- Content of rptconsulta.php
<?php
//Envia a imprimir los reportes relacionados a la Consulta Medica por medio de su Id de Consulta
$consulta = $_GET["consulta"];
$url = "http://localhost:8089/hrmedic/JasperPHP/rptatencion.php?consulta=" . $consulta;
echo "<SCRIPT>window.open('$url', '_blank');</SCRIPT>";
$url = "http://localhost:8089/hrmedic/JasperPHP/rptreceta.php?consulta=" . $consulta;
echo "<SCRIPT>window.open('$url', '_blank');</SCRIPT>";
$url = "http://localhost:8089/hrmedic/JasperPHP/rptimagen.php?consulta=" . $consulta;
echo "<SCRIPT>window.open('$url', '_blank');</SCRIPT>";
$url = "http://localhost:8089/hrmedic/JasperPHP/rptlaboratorio.php?consulta=" . $consulta;
echo "<SCRIPT>window.open('$url', '_blank');</SCRIPT>";
echo "<SCRIPT>window.close();</SCRIPT>";
?>