With the development of FlexReport, there are some breaking changes that took place in C1.Win.C1Document.C1DocumentSource and C1.Win.C1Document.C1SSRSDocumentSource. You should be aware of the following breaking changes while using C1.Win.C1Document.C1DocumentSource and C1.Win.C1Document.C1SSRSDocumentSource.
- All OpenXXX methods have been removed:
- public void Open(C1DocumentLocation documentLocation);
- public IAsyncActionWithProgress<double> OpenAsyncEx(C1DocumentLocation documentLocation);
- public IAsyncActionWithProgress<double> OpenAsyncEx();
- public void Open();
- public Task OpenAsync();
- public Task OpenAsync(C1DocumentLocation documentLocation);
Now C1SSRSDocumentSource.Generate() can be used immediately after defining all necessary properties like DocumentLocation, ConnectionOptions, etc.
- All GenerateXXX methods are now accessible only in C1SSRSDocumentSource; in C1DocumentSource these methods are internal:
- public void Generate();
- public IAsyncActionWithProgress<double> GenerateAsyncEx();
- public Task GenerateAsync();
- All ApplyParameterValuesXXX and CheckParameterValuesXXX methods have been removed:
- public List<ParameterValueError> ApplyParameterValues();
- public IAsyncOperationWithProgress<List<ParameterValueError>, double> ApplyParameterValuesAsyncEx();
- public Task<List<ParameterValueError>> ApplyParameterValuesAsync();
- public List<ParameterValueError> CheckParameterValues();
- public Task<List<ParameterValueError>> CheckParameterValuesAsync();
- public IAsyncOperationWithProgress<List<ParameterValueError>, double> CheckParameterValuesAsyncEx();
Use C1SSRSDocumentSource.ValidateParameters(...) instead. The values of parameters are applied automatically before generating.
- Methods ExecuteCustomActionXXX, GetPageXXX and GetBookmarkPositionXXX() are now internal and inaccessible:
- public IAsyncOperationWithProgress<C1BookmarkPosition, double> ExecuteCustomActionAsyncEx(CustomAction action);
- public Task<C1BookmarkPosition> ExecuteCustomActionAsync(CustomAction action);
- public C1Page GetPage(int pageIndex);
- public Task<C1Page> GetPageAsync(int pageIndex);
- public IAsyncOperationWithProgress<C1Page, double> GetPageAsyncEx(int pageIndex);
- public virtual C1Page GetLoadedPage(int pageIndex);
- public bool IsPageLoading(int pageIndex);
- public C1BookmarkPosition GetBookmarkPosition(string bookmark);
- public IAsyncOperationWithProgress<C1BookmarkPosition, double> GetBookmarkPositionAsyncEx(string bookmark);
- public Task<C1BookmarkPosition> GetBookmarkPositionAsync(string bookmark);
- All functionality related to text searching has been moved to C1FlexViewer. In addition, following methods and properties have been removed:
- public C1FoundPosition FindTextStart(int startPageIndex, bool wholeDocument, C1FindTextParams findParams);
- public IAsyncOperationWithProgress<C1FoundPosition, double> FindTextStartAsyncEx(int startPageIndex, bool wholeDocument, C1FindTextParams findParams);
- public Task<C1FoundPosition> FindTextStartAsync(int startPageIndex, bool wholeDocument, C1FindTextParams findParams);
- public C1FoundPosition FindTextNext(C1FoundPosition foundPosition);
- public IAsyncOperationWithProgress<C1FoundPosition, double> FindTextNextAsyncEx(C1FoundPosition foundPosition);
- public Task<C1FoundPosition> FindTextNextAsync(C1FoundPosition foundPosition);
- public C1FoundPosition FindTextPrevious(C1FoundPosition foundPosition);
- public IAsyncOperationWithProgress<C1FoundPosition, double> FindTextPreviousAsyncEx(C1FoundPosition foundPosition);
- public Task<C1FoundPosition> FindTextPreviousAsync(C1FoundPosition foundPosition);
- public void FindTextReset();
- public C1HighlightAttrs FindMatchHighlight { get; set; }
- public C1HighlightAttrs ActiveFindMatchHighlight { get; set; }
- public IList<C1FoundPosition> FoundPositions { get; }
- public C1FoundPosition ActiveFoundPosition { get; set; }
- The following properties have been removed (text selection functionality has been moved to viewers):
- public C1DocumentRange SelectedRange { get; set; }
- public C1HighlightAttrs SelectionHighlight { get; set; }
- The property - C1DocumentSource.State { get; set; } and enum - C1DocumentSourceState have been removed.
Instead, use C1DocumentSource.BusyState property as follows:
public C1DocumentSourceBusyState BusyState { get; }
// Summary:
// Describes the busy state of a C1DocumentSource object.
public enum C1DocumentSourceBusyState
{
// Summary:
// The document is ready (not busy).
Ready,
// Summary:
// The document is currently generating.
Generating,
// Summary:
// The document is currently exporting.
Exporting,
// Summary:
// The document is currently printing.
Printing,
}
- The following properties can be used to determine the current state of the C1DocumentSource:
// Summary:
// Gets the value indicating whether the current C1DocumentSource busy.
public bool IsBusy { get; }
// Summary:
// Gets a value indicating whether this C1DocumentSource is disposed and can not be longer used.
public bool IsDisposed { get; }
- The following events have been removed:
- event EventHandler<ExecuteCustomActionCompletedEventArgs> ExecuteCustomActionCompleted;
- event EventHandler<GetPageCompletedEventArgs> GetPageCompleted;
- event EventHandler<GetLinkTargetPositionCompletedEventArgs> GetLinkTargetPositionCompleted;
- event EventHandler PagesClear;
- The following events have been moved to C1SSRSDocumentSource:
- event EventHandler<AsyncCompletedEventArgs> GenerateCompleted;
- event EventHandler<ValidateParametersCompletedEventArgs> ValidateParametersCompleted;
- event EventHandler<ExportCompletedEventArgs> ExportCompleted;
- The following methods are accessible only through C1SSRSDocumentSource():
- public void Clear();
- public void Cancel();
- Methods ValidateParameterXXX have been added to replace ApplyParameterValues and CheckParameterValues:
- public List<ParameterValidationError> ValidateParameters();
- Async variants:
- public new IAsyncOperationWithProgress<List<ParameterValidationError>, double> ValidateParametersAsyncEx();
- public Task<List<ParameterValidationError>> ValidateParametersAsync();
These methods validate the current parameter values and refresh their valid values lists if the values are valid. Note that parameter values are now applied automatically when a report generation starts.