public byte[][] RenderReport(string reportPath, int id, string docType, short paperSize, bool save)
        {
            string historyID  = null;
            string deviceInfo = "";

            //@"<DeviceInfo><DpiX>300</DpiX><DpiY>300</DpiY></DeviceInfo> ";
            Byte[]       results;
            const string format    = "IMAGE";
            string       encoding  = String.Empty;
            string       mimeType  = String.Empty;
            string       extension = String.Empty;

            Warning[] warnings  = null;
            string[]  streamIDs = null;

            System.Collections.Generic.List <byte[]> list = new System.Collections.Generic.List <byte[]>();
            try
            {
                ParameterValue[] rp = new ParameterValue[2];
                rp.SetValue(new ParameterValue {
                    Name = "id", Value = id.ToString()
                }, 0);
                rp.SetValue(new ParameterValue {
                    Name = "DT", Value = DateTime.Now.ToString()
                }, 1);
                ei = res.LoadReport(reportPath, historyID);
                res.SetExecutionParameters(rp, "ru-ru");
                int page = 0;
                while (true)
                {
                    deviceInfo = string.Format(@"<DeviceInfo><OutputFormat>{0}</OutputFormat><PrintDpiX>300</PrintDpiX><PrintDpiY>300</PrintDpiY><StartPage>{1}</StartPage></DeviceInfo>", docType, ++page);
                    results    = res.Render(format, deviceInfo,
                                            out extension, out encoding,
                                            out mimeType, out warnings, out streamIDs);
                    ExecutionInfo2 ei2 = res.GetExecutionInfo2();
                    if (results != null && results.Length > 0)
                    {
                        list.Add(results);
                    }
                    else
                    {
                        break;
                    }
                }
                m_numberOfPages = list.Count;
                if (m_numberOfPages > 0)
                {
                    return(list.ToArray());
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex)
            {
                throw new Kesco.Lib.Log.DetailedException(ex.Message, ex, Kesco.Lib.Log.Priority.ExternalError, string.Format("Parameters - reportPath (URL): {0} DocumentID: {1} DocumentType: {2}", reportPath, id, docType));
            }
        }
        public RSExecutionInfo2 GetExecutionInfo2()
        {
            ExecutionInfo2 outval = rs.GetExecutionInfo2();

            return((RSExecutionInfo2)Converter.Convert(outval));
        }