Re: Creating a PDF from web with reports
Date: 28 Oct 2003 01:37:20 -0800
Message-ID: <8e3f58b1.0310280137.4a7d6f21_at_posting.google.com>
Hiya,
[Quoted] I found an answer for myself, due to nobody's told me a solution.
This is what I did: do another query to pdf, via javascript.
function abrirPDF(idioma, any, mes, centro)
{
var URL;
Trim(idioma); Trim(any); Trim(mes); Trim(centro);
URL = "consumo_x_linea.rdf&userid=scott/tiger_at_test&desformat=pdf&destype=cache&PIDIOMA="+idioma+"&PANY="+any+"&PMES="+mes+"&PCENTRO="+centro;
[Quoted] window.open(URL,'Consumo por
linea','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,titlebar=yes,resizable=yes,width=800,height=600');
}
[Quoted] but you need to have this vars catched:
<!-- RECEPCION DE PARAMETROS -->
<jsp:directive.page import="java.lang.*" />
<%! private String strIdioma = "CAS"; %>
<%! private String strCentro = ""; %>
<%! private String strNomCentro = ""; %>
<%! private String strMes = ""; %>
<%! private String strAnyo = ""; %>
<!-- y recuperamos los valores -->
<rw:getValue id="strIdioma" src="PIDIOMA"/>
<rw:getValue id="strCentro" src="PCENTRO"/>
<rw:getValue id="strNomCentro" src="PNOMCEN"/>
<rw:getValue id="strMes" src="PMES"/>
<rw:getValue id="strAnyo" src="PANY"/>
and, where you desire to do the calling, do this call to a javascript function:
<p align="right"> <a href="javascript:abrirPDF('<%= strIdioma %>','<%= strAnyo%>','<%= strMes %>','<%= strCentro %>')"><img border="0" src="images/dcib008b.gif" width="20" height="20" alt="Imprimir Informe"></a>
</p> Received on Tue Oct 28 2003 - 10:37:20 CET