public Microsoft.ReportingServices.ReportIntermediateFormat.ReportSnapshot Execute(out OnDemandProcessingContext odpContext) { ReportProcessingCompatibilityVersion.TraceCompatibilityVersion(m_configuration); odpContext = null; OnDemandMetadata onDemandMetadata = PrepareMetadata(); onDemandMetadata.GlobalIDOwnerCollection = m_globalIDOwnerCollection; Microsoft.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot = onDemandMetadata.ReportSnapshot; Global.Tracer.Assert(reportSnapshot != null, "ReportSnapshot object must exist"); try { UserProfileState userProfileState = UserProfileState.None; if (PublicProcessingContext.Parameters != null) { userProfileState |= PublicProcessingContext.Parameters.UserProfileState; } odpContext = CreateOnDemandContext(onDemandMetadata, reportSnapshot, userProfileState); CompleteOdpContext(odpContext); Merge odpMerge; Microsoft.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance = CreateReportInstance(odpContext, onDemandMetadata, reportSnapshot, out odpMerge); PreProcessSnapshot(odpContext, odpMerge, reportInstance, reportSnapshot); odpContext.SnapshotProcessing = true; odpContext.IsUnrestrictedRenderFormatReferenceMode = true; ResetEnvironment(odpContext, reportInstance); if (odpContext.ThreadCulture != null) { Thread.CurrentThread.CurrentCulture = odpContext.ThreadCulture; } UpdateUserProfileLocation(odpContext); return(reportSnapshot); } finally { CleanupAbortHandler(odpContext); if (odpContext != null && odpContext.GlobalDataSourceInfo != null && odpContext.GlobalDataSourceInfo.Values != null) { foreach (ReportProcessing.DataSourceInfo value in odpContext.GlobalDataSourceInfo.Values) { if (value.TransactionInfo != null) { if (value.TransactionInfo.RollbackRequired) { if (Global.Tracer.TraceInfo) { Global.Tracer.Trace(TraceLevel.Info, "Data source '{0}': Rolling back transaction.", value.DataSourceName.MarkAsModelInfo()); } try { value.TransactionInfo.Transaction.Rollback(); } catch (Exception innerException) { throw new ReportProcessingException(ErrorCode.rsErrorRollbackTransaction, innerException, value.DataSourceName.MarkAsModelInfo()); } } else { if (Global.Tracer.TraceVerbose) { Global.Tracer.Trace(TraceLevel.Verbose, "Data source '{0}': Committing transaction.", value.DataSourceName.MarkAsModelInfo()); } try { value.TransactionInfo.Transaction.Commit(); } catch (Exception innerException2) { throw new ReportProcessingException(ErrorCode.rsErrorCommitTransaction, innerException2, value.DataSourceName.MarkAsModelInfo()); } } } if (value.Connection != null) { try { odpContext.CreateAndSetupDataExtensionFunction.CloseConnection(value.Connection, value.ProcDataSourceInfo, value.DataExtDataSourceInfo); } catch (Exception innerException3) { throw new ReportProcessingException(ErrorCode.rsErrorClosingConnection, innerException3, value.DataSourceName.MarkAsModelInfo()); } } } } } }
public static void SerializeReport(Report report, Stream stream, IConfiguration configuration) { int compatibilityVersion = ReportProcessingCompatibilityVersion.GetCompatibilityVersion(configuration); new IntermediateFormatWriter(stream, compatibilityVersion).Write(report); }
internal PublishingVersioning(IConfiguration configuration, PublishingContextBase publishingContext) { m_configuration = configuration; m_publishingContext = publishingContext; m_configVersion = ReportProcessingCompatibilityVersion.GetCompatibilityVersion(m_configuration); }
public static void DeserializeGroupTree(Report report, IChunkFactory chunkFactory, GlobalIDOwnerCollection globalIDOwnerCollection, IConfiguration configuration, ref OnDemandMetadata odpMetadata) { bool prohibitSerializableValues = configuration != null && configuration.ProhibitSerializableValues; OnDemandProcessingManager.EnsureGroupTreeStorageSetup(odpMetadata, chunkFactory, globalIDOwnerCollection, true, ReportProcessingCompatibilityVersion.GetCompatibilityVersion(configuration), prohibitSerializableValues); IStorage storage = odpMetadata.GroupTreeScalabilityCache.Storage; GroupTreePartition groupTreePartition = (GroupTreePartition)storage.Retrieve(odpMetadata.GroupTreeRootOffset); Global.Tracer.Assert(groupTreePartition.TopLevelScopeInstances[0].GetObjectType() == ObjectType.ReportInstanceReference, "GroupTree root partition did not contain a ReportInstance"); odpMetadata.ReportInstance = (groupTreePartition.TopLevelScopeInstances[0] as IReference <ReportInstance>); odpMetadata.Report = report; odpMetadata.ReportSnapshot.Report = report; }
public PublishingVersioning(IConfiguration configuration, PublishingContextBase publishingContext) { this.m_configuration = configuration; this.m_publishingContext = publishingContext; this.m_configVersion = ReportProcessingCompatibilityVersion.GetCompatibilityVersion(this.m_configuration); }