@Override
public PageContext formSendedEvent(PageContext pc, HttpServletRequest request, HttpServletResponse response)
{
String rptUrl = "";
DynamicMessageControl msg = (DynamicMessageControl) pc.getControl("result_msg");
ReportsEngine re;
try
{
if (HttpRequestUtils.getValue(request, "cboFormat").equals("docx"))
{
re = new DocxReprotsEngineImpl(getWorkspace(), "weather");
}
else
{
re = new PdfReprotsEngineImpl(getWorkspace(), "weather");
}
re.getReport().addStaticValue("title", HttpRequestUtils.getValue(request, "txtTitle"));
rptUrl = re.generateReport();
msg.setVisible(true);
msg.setType(DynamicMessageControl.MessageTypes.Information);
msg.setMessage("<a href=\"" + rptUrl + "\" target=\"_blank\">Descargar archivo</a>");
}