Class ReportViewerState
- Namespace
- ReportWright.Blazor.Viewer
- Assembly
- ReportWright.Blazor.Viewer.dll
Everything the viewer knows and does, with no markup: the report, its prompts and values, the pages, the current page and zoom, search, sorts, toggles and the drillthrough back stack. The component renders this and forwards gestures to it; a test drives it without a browser.
public sealed class ReportViewerState : IDisposable
- Inheritance
-
ReportViewerState
- Implements
- Inherited Members
Constructors
- ReportViewerState(ReportViewerBackend)
Initializes the state over a backend.
Properties
- ActionableElementIds
Gets the element ids on the current page that a click does something to: toggles, sorts and navigable actions.
- AllPromptsSatisfied
Gets whether every prompt has a valid value, so the report can run without the user.
- BackStack
Gets the reports a drillthrough left behind, oldest first.
- Backend
Gets the backend.
- CanGoBack
Gets whether BackAsync(CancellationToken) has somewhere to go.
- CurrentHit
Gets the index of the current hit, from 0; -1 for none.
- CurrentHtmlPage
Gets the markup of the current page, or null.
- CurrentPage
Gets the current page, from 1; 0 before the first run.
- Definition
Gets the loaded definition.
- DocumentMap
Gets the document map.
- Error
Gets the message of the last failure, or null.
- ExportFormats
Gets the export format names the backend offers.
- FitScale
Gets the scale a fit mode computed from the surface size; the component sets it with SetFitScale(double).
- Id
Gets the prefix of every element id this viewer writes, unique per instance so several viewers share a page.
- IsBusy
Gets whether a load, run or refresh is in progress.
- IsStale
Gets whether parameters changed since the last run.
- Layout
Gets the parameter layout grid of the report, or null for document order.
- MatchCase
Gets whether the search is case-sensitive.
- PageCount
Gets the number of pages.
- Pages
Gets the current pages, or null before the first run.
- Path
Gets the loaded report's path, or null before LoadAsync(string, IReadOnlyDictionary<string, ReportParameterValue>?, bool, bool, CancellationToken).
- Projection
Gets the HTML projection of the current pages, or null before the first run.
- Prompts
Gets the prompts as the engine last resolved them, hidden and host-supplied ones included.
- ReportName
Gets the report's display name: the file name of the path without its extension.
- Scale
Gets the scale to draw at: one CSS pixel per 15 twips at 1.
- SearchHits
Gets the search hits.
- SearchText
Gets the search text in force, empty for none.
- ShowDocumentMap
Gets or sets whether the document map pane is open.
- ShowParameters
Gets or sets whether the parameter bar is open.
- Sorts
Gets the interactive sorts in force.
- ToggledItems
Gets the toggle keys that differ from their initial state.
- Values
Gets the values the user or the host supplied, by name. Defaults the report computes are not here.
- VisiblePrompts
Gets the prompts the parameter bar shows: not hidden by the report and not supplied-and-hidden by the host.
- ZoomMode
Gets how the page is scaled.
- ZoomPercent
Gets the zoom percentage in force under Percent.
Methods
- ActivateAsync(string?, Twips, Twips, CancellationToken)
Carries out whatever is under a point on the current page: an action, a toggle or an interactive sort.
- BackAsync(CancellationToken)
Returns to the report a drillthrough left, with its parameters, sorts, toggles and page.
- ClearSearch()
Clears the search.
- Dispose()
Releases the processed report.
- DrillthroughAsync(string, IReadOnlyList<ReportDrillthroughParameter>, CancellationToken)
Opens another report with the given parameters, remembering the current one.
- ExportAsync(string, CancellationToken)
Exports the current pages.
- FirstPage()
Moves to the first page.
- GoToPage(int)
Moves to a page; out-of-range values clamp.
- HitRegionsOnCurrentPage()
Gets the regions of every hit on the current page, with whether each belongs to the current hit.
- LastPage()
Moves to the last page.
- LoadAsync(string, IReadOnlyDictionary<string, ReportParameterValue>?, bool, bool, CancellationToken)
Loads a report: its definition, layout and prompts. Any previous report, sorts and toggles are dropped.
- NextHit()
Moves to the next hit, wrapping.
- NextPage()
Moves to the next page.
- PreviousHit()
Moves to the previous hit, wrapping.
- PreviousPage()
Moves to the previous page.
- RefreshPromptsAsync(CancellationToken)
Resolves the prompts again against the current values, fetching data for query-driven valid values.
- RunAsync(CancellationToken)
Processes and paginates the report with the current values, sorts and toggles, then projects it.
- Search(string, bool)
Searches the report and moves to the first hit at or after the current page.
- SetFitScale(double)
Records the scale a fit mode computed.
- SetParameterAsync(string, ReportParameterValue, CancellationToken)
Sets a parameter. The report becomes stale; prompts that depend on it are resolved again.
- SetZoom(int)
Sets a fixed zoom, clamped to 25–400, and leaves any fit mode.
- SetZoomMode(ZoomMode)
Switches to a fit mode; the component then measures the surface and calls SetFitScale(double).
- SortAsync(string, CancellationToken)
Cycles the interactive sort of a textbox (none, ascending, descending) and re-processes the report.
- SortOf(string)
Gets the sort direction in force on a textbox, or null for none.
- SortableRegionsOnCurrentPage()
Gets the regions on the current page that offer an interactive sort, with the direction in force on each (null for none).
- Toggle(string)
Flips a toggle and re-lays the pages; the pages the engine reports as changed are returned.
- ZoomIn()
Steps to the next preset above the current scale.
- ZoomOut()
Steps to the next preset below the current scale.
Events
- Changed
Raised after any observable change, so a component can re-render.