Update send-mail-message.md (#1244)
* Update send-mail-message.md * Update send-mail-message.md * Update html5-viewer-telerik-rest-service.md
This commit is contained in:
Родитель
15221fa1f4
Коммит
66918538f8
|
@ -10,15 +10,15 @@ position: 3
|
|||
|
||||
# Using Send Mail Message Functionality in Native Blazor Report Viewer
|
||||
|
||||
The native Blazor Report Viewer provides the capability to send the currently displaued report in the specified document format with an e-mail message.
|
||||
The native Blazor Report Viewer provides the capability to send the currently displaced report in the specified document format with an e-mail message.
|
||||
|
||||
## Enabling the send mail message functionality
|
||||
|
||||
By default, the __send mail message__ button is hidden. This is because the [SendMailMessage](/reporting/api/Telerik.Reporting.Services.WebApi.ReportsControllerBase#Telerik_Reporting_Services_WebApi_ReportsControllerBase_SendMailMessage) (or the respective method for ServiceStack, ASP.NET Core, etc.) should be implemented first, so that the e-mail messages can be send server-side.
|
||||
By default, the __send mail message__ button is hidden. This is because the [SendMailMessage](/reporting/api/Telerik.Reporting.Services.WebApi.ReportsControllerBase#Telerik_Reporting_Services_WebApi_ReportsControllerBase_SendMailMessage) (or the respective method for ServiceStack, ASP.NET Core, etc.) should be implemented first so that the e-mail messages can be sent server-side.
|
||||
|
||||
Web browsers cannot initiate the sending of e-mail messages containing attachments as a security measure. More information on how implement the necessary server-side code is available at [Implement Send Mail Message]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/implement-send-mail-message%}).
|
||||
Web browsers cannot initiate the sending of e-mail messages containing attachments as a security measure. More information on how to implement the necessary server-side code is available at [Implement Send Mail Message]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/implement-send-mail-message%}).
|
||||
|
||||
Once ready, the send mail message toolbar button can be enabled throug the `EnableSendEmail` initialization option.
|
||||
Once ready, the send mail message toolbar button can be enabled through the `EnableSendEmail` initialization option.
|
||||
|
||||
````CSHTML
|
||||
<ReportViewer
|
||||
|
@ -34,7 +34,7 @@ The `Send Mail Message` dialog is a [Telerik Blazor UI Window](https://docs.tele
|
|||
|
||||
## Pre-configuring the Send Mail Message Dialog Settings
|
||||
|
||||
The settings are be populated from a `SendEmailDialogSettings` tag, that sits inside the `ReportViewerSettings` parent tag. The values are used __only__ for initial population of the fields. Two-way binding is __not__ supported for those settings.
|
||||
The settings are populated from a `SendEmailDialogSettings` tag, that sits inside the `ReportViewerSettings` parent tag. The values are used __only__ for the initial population of the fields. Two-way binding is __not__ supported for those settings.
|
||||
|
||||
### Markup Example
|
||||
|
||||
|
@ -59,11 +59,11 @@ The settings are be populated from a `SendEmailDialogSettings` tag, that sits in
|
|||
### Setting Fields
|
||||
|
||||
* __From__ (Required) - E-mail address used for the MailMessage `FROM` value.
|
||||
* __To__ (Required) - E-mail address used for the MailMessage `TO` value.
|
||||
* __CC__ (Optional) - E-mail address used for the MailMessage `CC` value.
|
||||
* __To__ (Required) - E-mail address used for the MailMessage `TO` value. Multiple addresses are not supported.
|
||||
* __CC__ (Optional) - E-mail addresses used for the MailMessage `CC` value. Use `,`(comma) to separate multiple e-mail addresses.
|
||||
* __Subject__ (Optional) - The MailMessage subject.
|
||||
* __Body__ (Optional) - The MailMessage body.
|
||||
* __Format__ - If empty, or not present in the list of supported formats by the report, the first available format from the list is chosen instead. Uses the non-localized values, such as `PDF`, `CSV` etc.
|
||||
* __Format__ - If empty, or not present in the list of supported formats by the report, the first available format from the list is chosen instead. Uses non-localized values, such as `PDF`, `CSV` etc.
|
||||
|
||||
## See Also
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ HTML5-based report viewers provide the capability to send the current report in
|
|||
|
||||
## Enabling the send mail message functionality
|
||||
|
||||
By default the send mail message button is hidden. This is because the [SendMailMessage](/reporting/api/Telerik.Reporting.Services.WebApi.ReportsControllerBase#Telerik_Reporting_Services_WebApi_ReportsControllerBase_SendMailMessage) (or the respective method for ServiceStack, ASP.NET Core, etc.) should be implemented first, so that the e-mail messages can be send server-side. Web browser (JS client) cannot initiate sending of e-mail messages containing attachments as a security measure. More info on actually implementing the necessary server-side code is available at [Implement Send Mail Message]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/implement-send-mail-message%}). Once ready, the send mail message toolbar button can be enabled with the a viewer SendEmail initialization option. For more information see [Html5 Report Viewer Options]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/html5-report-viewer/api-reference/report-viewer-initialization%}#options).
|
||||
By default, the send mail message button is hidden. This is because the [SendMailMessage](/reporting/api/Telerik.Reporting.Services.WebApi.ReportsControllerBase#Telerik_Reporting_Services_WebApi_ReportsControllerBase_SendMailMessage) (or the respective method for ServiceStack, ASP.NET Core, etc.) should be implemented first so that the e-mail messages can be sent server-side. Web browser (JS client) cannot initiate sending of e-mail messages containing attachments as a security measure. More info on actually implementing the necessary server-side code is available at [Implement Send Mail Message]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/implement-send-mail-message%}). Once ready, the send mail message toolbar button can be enabled with the viewer SendEmail initialization option. For more information see [Html5 Report Viewer Options]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/html5-report-viewer/api-reference/report-viewer-initialization%}#options).
|
||||
|
||||
> Please note that Angular Report Viewer requires setting the __templateUrl__ option to an HTML template specifically designed for send mail message functionality to work properly, i.e. __telerikReportViewerTemplate-ng.html__ which comes from *node_modules/@progress/telerik-angular-report-viewer/dist/dependencies/telerikReportViewerTemplate-ng.html*.
|
||||
|
||||
|
@ -28,8 +28,8 @@ The Send Mail Message dialog is a Kendo Window Widget, that stays on top of the
|
|||
The dialog consists of the following components:
|
||||
|
||||
* __From input__ (Required) - E-mail address used for the MailMessage FROM value.
|
||||
* __To input__ (Required) - E-mail address used for the MailMessage TO value.
|
||||
* __CC input__ (Optional) - E-mail address used for the MailMessage CC value.
|
||||
* __To input__ (Required) - E-mail addresses used for the MailMessage TO value. Use `,`(comma) to separate multiple e-mail addresses.
|
||||
* __CC input__ (Optional) - E-mail addresses used for the MailMessage CC value. Use `,`(comma) to separate multiple e-mail addresses.
|
||||
* __Subject input__ (Optional) - The MailMessage subject.
|
||||
* __Body input__ (Optional) - The MailMessage body.
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ position: 3
|
|||
|
||||
# Telerik Report Viewer and Telerik Reporting REST Service
|
||||
|
||||
Most of the [Telerik Report Viewers]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/overview%}) are able to connect to a running [Telerik Reporting REST Service]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/overview%}) to request and get report documents rendered server-side. In this article we will use the [HTML5 Report Viewer]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/html5-report-viewer/overview%}) for clarity. The information regarding the communication between the viewer and the service is valid for the other Report Viewers as well.
|
||||
Most of the [Telerik Report Viewers]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/overview%}) can connect to a running [Telerik Reporting REST Service]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/overview%}) to request and get report documents rendered server-side. In this article we will use the [HTML5 Report Viewer]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/html5-report-viewer/overview%}) for clarity. The information regarding the communication between the viewer and the service is valid for the other Report Viewers as well.
|
||||
|
||||
The HTML5 Report Viewer is a client-side widget served by a running instance of Telerik Reporting REST Service. The state of the report displayed in the viewer is preserved between requests by the __Reporting REST Service__ and having reports' __cache storage is obligatory__.
|
||||
|
||||
|
@ -21,27 +21,29 @@ To configure the Reporting REST service cache you can choose between the availab
|
|||
|
||||
The following actions are performed on displaying a report in a viewer that utilizes a Telerik Reporting REST Service for rendering the reports. For example, in the HTML5 Report Viewer:
|
||||
|
||||
1. On loading the page with the HTML5 Viewer, the viewer sends a request to the Reporting REST service to cache a viewer with an unique clientId;
|
||||
1. On loading the page with the HTML5 Viewer, the viewer sends a request to the Reporting REST service to cache a viewer with a unique clientId;
|
||||
1. The client-side report source (report description as a string and parameters collection in a JSON formatted string) is sent to the Reporting REST service in a request for information about visible parameters;
|
||||
1. The Reporting REST service resolves the received string description to a valid server-side report source object through its [report source resolver]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/rest-service-report-source-resolver/overview%}) set in the service's configuration. Then the service returns JSON serialized information about the report's __ReportParameters__ collection. The HTML5 Viewer generates its Parameters Area based on the information for visible report parameters, their types and default|initial values;
|
||||
1. The Reporting REST service resolves the received string description to a valid server-side report source object through its [report source resolver]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/rest-service-report-source-resolver/overview%}) set in the service's configuration. Then the service returns JSON serialized information about the report's __ReportParameters__ collection. The HTML5 Viewer generates its Parameters Area based on the information for visible report parameters, their types, and default|initial values;
|
||||
1. The client-side report source (report description as a string and parameters collection in a JSON formatted string) is sent to the Reporting REST service in a request for registering the report instance on the server;
|
||||
1. The Reporting REST service resolves the received string description to a valid server-side report source object through its [report source resolver]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/rest-service-report-source-resolver/overview%}) set in the service's configuration. Then the service caches the server-side report source with an unique instanceId for the current clientId;
|
||||
1. The viewer sends a request for creating a document with appropriate rendering format. The service adds a cache entry for the document with an unique documentId for the current instanceId;
|
||||
1. The client (HTML5 Viewer) awaits the report processing and rendering on the server to end. The viewer requests the state of the document and the number of rendered page on an even interval from the Reporting REST service.
|
||||
1. When the first page is ready, the viewer requests the page and it is displayed. The polling continues untill all document pages are ready. Additional requests for resources as images may follow. All pages and resources are cached by the service.
|
||||
1. The Reporting REST service resolves the received string description to a valid server-side report source object through its [report source resolver]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/rest-service-report-source-resolver/overview%}) set in the service's configuration. Then the service caches the server-side report source with a unique instanceId for the current clientId;
|
||||
1. The viewer sends a request for creating a document with the appropriate rendering format. The service adds a cache entry for the document with a unique documentId for the current instanceId;
|
||||
1. The client (HTML5 Viewer) awaits the report processing and rendering on the server to end. The viewer requests the state of the document and the number of rendered pages on an even interval from the Reporting REST service.
|
||||
1. When the first page is ready, the viewer requests the page and it is displayed. The polling continues until all document pages are ready. Additional requests for resources as images may follow. All pages and resources are cached by the service.
|
||||
|
||||
The communication between the HTML5 Viewer and Reporting REST Service happens via AJAX requests. More details about the type of each request to the service can be found in the [REST API]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/rest-api-reference/overview%}).
|
||||
|
||||
> If you connect a [WinForms ReportViewer]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/windows-forms-application/how-to-use-windows-forms-report-viewer-with-rest-service%}) or [WPF ReportViewer]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/wpf-application/how-to-use-wpf-report-viewer-with-rest-service%}) to a Reporting REST Service instance, there will be a new ClientId generated on each request sent by the desktop viewer.
|
||||
|
||||
On each interaction with the report in the HTML5 Viewer, the service accesses the cache storage provided in the service's configuration (ReportServiceConfiguration property). The current client ID, instance ID and document ID are used to locate the correct resources for the report and return them to the viewer.
|
||||
On each interaction with the report in the HTML5 Viewer, the service accesses the cache storage provided in the service's configuration (ReportServiceConfiguration property). The current client ID, instance ID, and document ID are used to locate the correct resources for the report and return them to the viewer.
|
||||
|
||||
The created cache records expiration period as well as other service settings may be setup using an implementation of the [IReportServiceConfiguration](/reporting/api/Telerik.Reporting.Services.IReportServiceConfiguration) interface as service configuration. See the [How to implement the ReportsController in an application]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/asp.net-web-api-implementation/how-to-implement-the-reportscontroller-in-an-application%}) and the [How to Add Telerik Reporting REST ServiceStack to Web Application]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/servicestack-implementation/how-to-add-telerik-reporting-rest-servicestack-to-web-application%}) help articles accordingly for implementation details.
|
||||
The Reporting REST Service storage assets expire. The expired assets are cleaned by the service periodically. More details about the storage structure and assets handling may be found in the blog post [Telerik Reporting REST Service Storage Revealed](https://www.telerik.com/blogs/telerik-reporting-rest-service-storage-revealed).
|
||||
|
||||
Important cache management related properties of the IReportServiceConfiguration:
|
||||
The created cache records expiration period, as well as other service settings, may be set up using an implementation of the [IReportServiceConfiguration](/api/Telerik.Reporting.Services.IReportServiceConfiguration) interface as service configuration. See the [How to implement the ReportsController in an application]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/asp.net-web-api-implementation/how-to-implement-the-reportscontroller-in-an-application%}) and the [How to Add Telerik Reporting REST ServiceStack to Web Application]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/servicestack-implementation/how-to-add-telerik-reporting-rest-servicestack-to-web-application%}) help articles accordingly for implementation details.
|
||||
|
||||
* __[ClientSessionTimeout](/reporting/api/Telerik.Reporting.Services.IReportServiceConfiguration#Telerik_Reporting_Services_IReportServiceConfiguration_ClientSessionTimeout) property__ Gets or sets a value in minutes indicating how long a client(viewer) session will be preserved in the service storage after the last interaction initiated by this client. When this timeout expires, operations with the viewer will not be possible - there must be registered a new client(viewer). The entries of expired clients are removed automatically when a new HTML5 Viewer(client) is registered in the cache storage.
|
||||
* __[ReportSharingTimeout](/reporting/api/Telerik.Reporting.Services.IReportServiceConfiguration#Telerik_Reporting_Services_IReportServiceConfiguration_ReportSharingTimeout) property__ Gets or sets a value in minutes indicating how long a rendered report document from a client will be available to be reused, by the current and other clients which request the same report document. Two report documents are considered the same when they both comply with the following conditions:
|
||||
Important cache management-related properties of the IReportServiceConfiguration:
|
||||
|
||||
* __[ClientSessionTimeout](/api/Telerik.Reporting.Services.IReportServiceConfiguration#Telerik_Reporting_Services_IReportServiceConfiguration_ClientSessionTimeout) property__ Gets or sets a value in minutes indicating how long a client(viewer) session will be preserved in the service storage after the last interaction initiated by this client. When this timeout expires, operations with the viewer will not be possible - there must be registered a new client(viewer). The entries of expired clients are removed automatically when a new HTML5 Viewer(client) is registered in the cache storage.
|
||||
* __[ReportSharingTimeout](/api/Telerik.Reporting.Services.IReportServiceConfiguration#Telerik_Reporting_Services_IReportServiceConfiguration_ReportSharingTimeout) property__ Gets or sets a value in minutes indicating how long a rendered report document from a client will be available to be reused, by the current and other clients which request the same report document. Two report documents are considered the same when they both comply with the following conditions:
|
||||
+ Use the same Report definition. For example, the same TRDP report file;
|
||||
+ Use the same [Report Parameter]({%slug telerikreporting/designing-reports/connecting-to-data/report-parameters/overview%}) values;
|
||||
+ The [Interactive Actions]({%slug telerikreporting/designing-reports/adding-interactivity-to-reports/actions/overview%}) are with the same state. For example, the _Toggle Visibility_ is either in expanded or collapsed state, or the _Sorting_ is in the same order;
|
||||
|
|
Загрузка…
Ссылка в новой задаче