public new ExecutionInfo LoadReportDefinition(byte[] Definition, out Warning[] warnings)
        {
            Warning[] w = null;
            ProxyMethod <ExecutionInfo> sql16Method  = new ProxyMethod <ExecutionInfo>("LoadReportDefinition3", () => LoadReportDefinition3(Definition, out w));
            ProxyMethod <ExecutionInfo> katmaiMethod = new ProxyMethod <ExecutionInfo>("LoadReportDefinition2", () => LoadReportDefinition2(Definition, out w));
            ProxyMethod <ExecutionInfo> yukonMethod  = new ProxyMethod <ExecutionInfo>("LoadReportDefinition", () => base.LoadReportDefinition(Definition, out w));
            ExecutionInfo result = ProxyMethodInvocation.Execute(this, sql16Method, katmaiMethod, yukonMethod);

            warnings = w;
            return(result);
        }
예제 #2
0
        private static ExecutionInfo FromSoapExecutionInfo(Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.ExecutionInfo soapExecutionInfo)
        {
            if (soapExecutionInfo == null)
            {
                return(null);
            }
            ReportParameterInfoCollection reportParameterInfoCollection = null;

            Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.ReportParameter[] parameters = soapExecutionInfo.Parameters;
            if (parameters != null)
            {
                ReportParameterInfo[] array = new ReportParameterInfo[parameters.Length];
                for (int i = 0; i < parameters.Length; i++)
                {
                    array[i] = SoapParameterToReportParameterInfo(parameters[i]);
                }
                reportParameterInfoCollection = new ReportParameterInfoCollection(array);
            }
            else
            {
                reportParameterInfoCollection = new ReportParameterInfoCollection();
            }
            PageCountMode  pageCountMode = PageCountMode.Actual;
            ExecutionInfo2 executionInfo = soapExecutionInfo as ExecutionInfo2;

            if (executionInfo != null && executionInfo.PageCountMode == Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.PageCountMode.Estimate)
            {
                pageCountMode = PageCountMode.Estimate;
            }
            ParametersPaneLayout parametersPaneLayout = null;
            ExecutionInfo3       executionInfo2       = soapExecutionInfo as ExecutionInfo3;

            if (executionInfo2 != null && executionInfo2.ParametersLayout != null && parameters != null)
            {
                parametersPaneLayout = new ParametersPaneLayout();
                SoapExecutionInfoToParametersLayout(parametersPaneLayout, executionInfo2, reportParameterInfoCollection);
            }
            ReportPageSettings pageSettings = new ReportPageSettings(soapExecutionInfo.ReportPageSettings.PaperSize.Height, soapExecutionInfo.ReportPageSettings.PaperSize.Width, soapExecutionInfo.ReportPageSettings.Margins.Left, soapExecutionInfo.ReportPageSettings.Margins.Right, soapExecutionInfo.ReportPageSettings.Margins.Top, soapExecutionInfo.ReportPageSettings.Margins.Bottom);

            return(new ExecutionInfo(soapExecutionInfo.ExecutionID, soapExecutionInfo.HistoryID, soapExecutionInfo.ReportPath, soapExecutionInfo.NumPages, soapExecutionInfo.HasDocumentMap, soapExecutionInfo.AutoRefreshInterval, soapExecutionInfo.CredentialsRequired, soapExecutionInfo.ParametersRequired, soapExecutionInfo.HasSnapshot, soapExecutionInfo.NeedsProcessing, soapExecutionInfo.ExpirationDateTime, soapExecutionInfo.AllowQueryExecution, pageCountMode, ReportDataSourceInfoCollection.FromSoapDataSourcePrompts(soapExecutionInfo.DataSourcePrompts), reportParameterInfoCollection, pageSettings, parametersPaneLayout));
        }
        public int Sort(string SortItem, SortDirectionEnum Direction, bool Clear, PageCountMode PaginationMode, out string ReportItem, out ExecutionInfo ExecutionInfo, out int NumPages)
        {
            string            rptItem       = null;
            int               nPages        = 0;
            ExecutionInfo2    execInfo      = null;
            ProxyMethod <int> initialMethod = new ProxyMethod <int>("Sort2", delegate
            {
                int result2 = Sort2(SortItem, Direction, Clear, PaginationMode, out rptItem, out execInfo);
                if (execInfo != null)
                {
                    nPages = execInfo.NumPages;
                }
                return(result2);
            });
            ProxyMethod <int> retryMethod = new ProxyMethod <int>("Sort", () => base.Sort(SortItem, Direction, Clear, out rptItem, out nPages));
            int result = ProxyMethodInvocation.Execute(this, initialMethod, retryMethod);

            ExecutionInfo = execInfo;
            NumPages      = nPages;
            ReportItem    = rptItem;
            return(result);
        }