public ExecutionInfo(string executionId, string historyId, string reportPath, int numPages, bool hasDocumentMap, int autoRefreshInterval, bool credentialsRequired, bool parametersRequired, bool hasSnapshot, bool needsProcessing, DateTime expirationDateTime, bool allowQueryExecution, PageCountMode pageCountMode, ReportDataSourceInfoCollection dataSourcePrompts, ReportParameterInfoCollection parameters, ReportPageSettings pageSettings, ParametersPaneLayout parametersPaneLayout) { ExecutionID = executionId; HistoryID = historyId; ReportPath = reportPath; NumPages = numPages; HasDocumentMap = hasDocumentMap; AutoRefreshInterval = autoRefreshInterval; CredentialsRequired = credentialsRequired; ParametersRequired = parametersRequired; HasSnapshot = hasSnapshot; NeedsProcessing = needsProcessing; ExpirationDateTime = expirationDateTime; AllowQueryExecution = allowQueryExecution; PageCountMode = pageCountMode; DataSourcePrompts = dataSourcePrompts; Parameters = parameters; ReportPageSettings = pageSettings; ParametersPaneLayout = parametersPaneLayout; }
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)); }