示例#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);
        }