Exemplo n.º 1
0
        public static short openGXReport(String document, IGxContext ctx)
        {
            IReportHandler reportHandler = ctx.reportHandler;

            if (reportHandler == null)
            {
                reportHandler = GxReportUtils.GetPrinter(
                    GxReportUtils.OUTPUT_RVIEWER_DLL,
                    ctx.GetPhysicalPath(),
                    null);
                ctx.reportHandler = reportHandler;
            }
            reportHandler.GxClearAttris();
            bool opened = reportHandler.GxOpenDoc(document);

            if (!ctx.isRemoteGXDB())
            {
                reportHandler.GxRptSilentMode();
            }

            if (opened)
            {
                while (reportHandler.GxIsAlive())
                {
                    try
                    {
                        Thread.Sleep(200);
                    }
                    catch (Exception) {; }
                }
                reportHandler.GxShutdown();
            }
            return(0);
        }
Exemplo n.º 2
0
 public IReportHandler getPrinter()
 {
     if (reportHandler == null)
     {
         oldReportHandler      = reportHandler;
         reportHandler         = GxReportUtils.GetPrinter(getOutputType(), context.GetPhysicalPath(), null);
         context.reportHandler = reportHandler;
     }
     return(reportHandler);
 }
Exemplo n.º 3
0
        public IReportHandler getPrinter()
        {
            if (reportHandler == null)
            {
                oldReportHandler = reportHandler;
                setContentType();
#if NETCORE
                reportHandler = GxReportUtils.GetPrinter(getOutputType(), context.GetPhysicalPath(), context.HttpContext.Response.Body);
#else
                reportHandler = GxReportUtils.GetPrinter(getOutputType(), context.GetPhysicalPath(), context.HttpContext.Response.OutputStream);
#endif
                context.reportHandler = reportHandler;
            }
            return(reportHandler);
        }