internal void SetDependencies(ReportParameterInfoCollection coll) { if (m_dependencyCollection != null) { return; } if (m_dependencies == null) { m_dependencyCollection = new ReportParameterInfoCollection(); return; } List <ReportParameterInfo> list = new List <ReportParameterInfo>(); string[] dependencies = m_dependencies; foreach (string name in dependencies) { ReportParameterInfo reportParameterInfo = coll[name]; if (reportParameterInfo != null) { list.Add(reportParameterInfo); reportParameterInfo.m_dependentsCollectionConstruction.Add(this); } } m_dependencyCollection = new ReportParameterInfoCollection(list); }
internal override ParametersPaneLayout GetParametersPaneLayout() { lock (m_syncObject) { EnsureExecutionSession(); if (m_processingHost.ExecutionInfo.ReportParameters != null && m_processingHost.ExecutionInfo.ReportParameters.ParametersLayout != null) { ReportParameterInfoCollection paramsInfo = ParameterInfoCollectionToApi(m_processingHost.ExecutionInfo.ReportParameters, SupportsQueries); return(BuildParameterPaneLayout(m_processingHost.ExecutionInfo.ReportParameters.ParametersLayout, paramsInfo)); } return(null); } }
public override ReportParameterInfoCollection GetParameters() { lock (m_syncObject) { EnsureExecutionSession(); ReportParameterInfoCollection parameters = m_executionInfo.Parameters; if (parameters != null) { for (int i = 0; i < parameters.Count; i++) { parameters[i].Visible = !m_hiddenParameters.Contains(i); } } return(parameters); } }
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.NETCore.Internal.Soap.ReportingServices2005.Execution.ExecutionInfo soapExecutionInfo) { if (soapExecutionInfo == null) { return(null); } ReportParameterInfoCollection reportParameterInfoCollection = null; Microsoft.Reporting.NETCore.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.NETCore.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)); }
private ParametersPaneLayout BuildParameterPaneLayout(ParametersGridLayout processingParameterLayout, ReportParameterInfoCollection paramsInfo) { List <GridLayoutCellDefinition> list = new List <GridLayoutCellDefinition>(processingParameterLayout.CellDefinitions.Count); foreach (ParameterGridLayoutCellDefinition cellDefinition in processingParameterLayout.CellDefinitions) { list.Add(new GridLayoutCellDefinition { Column = cellDefinition.ColumnIndex, Row = cellDefinition.RowIndex, ParameterName = cellDefinition.ParameterName }); } return(new ParametersPaneLayout { GridLayoutDefinition = new GridLayoutDefinition(new GridLayoutCellDefinitionCollection(list), processingParameterLayout.NumberOfRows, processingParameterLayout.NumberOfColumns, paramsInfo) }); }
private static void SoapExecutionInfoToParametersLayout(ParametersPaneLayout paramPaneLayout, ExecutionInfo3 soapExecInfo3, ReportParameterInfoCollection paramInfoCollection) { if (soapExecInfo3.ParametersLayout.CellDefinitions != null) { int num = soapExecInfo3.ParametersLayout.CellDefinitions.Length; GridLayoutCellDefinition[] array = new GridLayoutCellDefinition[num]; for (int i = 0; i < num; i++) { GridLayoutCellDefinition gridLayoutCellDefinition = new GridLayoutCellDefinition(); gridLayoutCellDefinition.Column = soapExecInfo3.ParametersLayout.CellDefinitions[i].ColumnsIndex; gridLayoutCellDefinition.Row = soapExecInfo3.ParametersLayout.CellDefinitions[i].RowIndex; gridLayoutCellDefinition.ParameterName = soapExecInfo3.ParametersLayout.CellDefinitions[i].ParameterName; array[i] = gridLayoutCellDefinition; } GridLayoutDefinition gridLayoutDefinition = paramPaneLayout.GridLayoutDefinition = new GridLayoutDefinition(new GridLayoutCellDefinitionCollection(array), soapExecInfo3.ParametersLayout.NumberOfRows, soapExecInfo3.ParametersLayout.NumberOfColumns, paramInfoCollection); } }
internal GridLayoutDefinition(GridLayoutCellDefinitionCollection cellDefs, int numRows, int numColumns, ReportParameterInfoCollection paramInfoCollection) { m_cellDefinitions = cellDefs; m_numberOfRows = numRows; m_numberOfColumns = numColumns; m_columnsVisibility = new bool[numColumns]; m_rowsVisibility = new bool[numRows]; if (paramInfoCollection == null || !paramInfoCollection.Any()) { return; } int j; for (j = 0; j < m_numberOfColumns; j++) { IEnumerable <GridLayoutCellDefinition> enumerable = m_cellDefinitions.Where((GridLayoutCellDefinition p) => p.Column == j); if (!enumerable.Any() && j < m_cellDefinitions.Max((GridLayoutCellDefinition p) => p.Column)) { m_columnsVisibility[j] = true; } foreach (GridLayoutCellDefinition param in enumerable) { if (paramInfoCollection.Any((ReportParameterInfo p) => p.Name == param.ParameterName && IsParamVisible(p))) { m_columnsVisibility[j] = true; m_rowsVisibility[param.Row] = true; } } } int i; for (i = 0; i < m_numberOfRows; i++) { if (!m_cellDefinitions.Where((GridLayoutCellDefinition p) => p.Row == i).Any() && i < m_cellDefinitions.Max((GridLayoutCellDefinition p) => p.Row)) { m_rowsVisibility[i] = true; } } }
internal SubreportProcessingEventArgs(string subreportName, ReportParameterInfoCollection paramMetaData, string[] dataSetNames) { m_subReportName = subreportName; m_paramMetaData = paramMetaData; m_dsNames = new ReadOnlyCollection <string>(dataSetNames); }