Telerik Report Viewer Download

4 views
Skip to first unread message

Agathe Thies

unread,
Apr 20, 2024, 12:02:46 AM4/20/24
to adophazad

I think I may not have explained the one use case well in my first post. I know how to programmatically export a report. The thing that I'm trying to do is enable the standard Export function in the Report Viewer....even in cases where the report viewer wants to disable it. That use case is one of the times we currently access the model - to set IsExportEnabled to true when it would otherwise be false. That is something that I don't see in the exposed API but we would need that.

Here is the specific scenario where we set IsExportEnable (note that this is how it works with the Silverlight viewer. I'm not sure this applies to WPF but that's just because I haven't tested there as we haven't finished porting our app to WPF):

telerik report viewer download


Download File »»» https://t.co/4IbesBWsJ6



I can understand that behavior because it makes sense in most cases. However, in our app we want the export button to still be available because there is no reason the user can't still export the report. In our SL code, we can just set the IsExportEnabled property to true (and I think we tweak the 'report is expired' message) and now the user can choose to Export the report even though the report expired (which is not really something the user understands anyway). Everything with the export works fine because I'm guessing the expired report is just rebuilt on the fly by the web server.

I read about using the file system to cache things but that seemed like a complexity we didn't want to deal with. We don't really want to pollute the web server with temporary files if we can avoid it. And it's certainly not a big deal if a report does expire since it probably means the user was working on something else for a while or maybe they just got unlucky and were working during an IIS recycle. We don't mind if the user gets an "Oops, you waited too long and so you'll need to re-run the report". However, it was nice in SL that even when that happened, we could let them export the report (which for us is a very common use case). It's especially useful when re-running the report could take a long time.

I know that there is a programmatic way to export reports but we aren't trying to "avoid depending on the viewer". The use case I'm talking about is when the user is in the report viewer, clicks to a new page, gets an 'expired' message but then wants to export. I suppose we could hide the standard export dropdown in the viewer and add our own custom dropdown that doesn't get disabled....but that seems like a lot of custom work and otherwise we really like how the standard export dropdown works. We'd rather not have to code our own programmatic export UI.

I should explain that our WPF app is maybe a bit different than the normal one. Since we are porting over our Silverlight code, we are trying to keep the same overall architecture. That is, our WPF app will still talk to a web server for any time it needs to hit the database. This is true for just normal data operations elsewhere in our app but also within the reporting module. In fact, our WPF app won't even be able to talk to the database directly (the database credentials only exist on the web server in a secure way).

The way we have the report viewer coded up in our WPF version of our app is to use the REST service to run reports. That works well since only the web server can connect to the database. We also rely on a custom IReportResolver for the SL app with lots of fancy logic for dynamically building up and processing the reports themselves. The REST service for WPF has worked out really well because we can re-use 99% of that same IReportResolver logic.

That said, we found another thing that would be nice to have as officially exposed behavior. In the SL version of our app, we set the ErrorMessage property on the model when we first bring up our window. Without that, our window is mostly just a big empty gray area where the report would be and users were a bit confused. Instead, we set the ErrorMessage to something like: "Nothing to display yet, enter some parameters and hit Run to get started". This way, the user is guided a bit on what their next step is. In SL, we found the ErrorMessage perfect for this because it display right in the middle of the viewer an automatically goes away when you run a report.

I understand how to control the session settings. I'm not so worried about eliminating expired sessions completely. If a user sits idle on our app for a long time, I'm fine that the session might expire. My only concern was how the report viewer UI behaved in that case. But it's a minor thing for us so we can live without it for now.

In our case (as I mentioned above but I know this thread is getting long), we *are* using the REST service. Our WPF app does not have database credentials (only the web server does) so it's not possible for the viewer to process/render the reports on the current machine.

We've used the TextResources functionality to control other text that the Report Viewer displays. However, I am talking about showing text when the report viewer is first shown but no report has been run. In that case, there isn't a TextResources message to configure because there is no message shown in that case with the 'vanilla' report viewer. Instead, before you run a report it is just a big blank area with a toolbar. We want to add a new message into that area guiding the user. So unless I'm missing something, TextResources won't help us here.

I'm not sure how an error event would work for us. As I mentioned, we are using the REST service so the report viewer isn't really the one in control of the report. Are you saying we could make some kind of 'dummy' report that is just blank and then cause that dummy report to throw an error? The whole point of the message we are trying to show is to help the user *before* they've run a report (which for us is time consuming so something we aren't going to do without the user clicking a 'Run' button).

ReportViewer.html - This file is in a subfolder named Views in both folders. Same code in both. Everything is the same. Same report file being referenced for both, which both are in the "Reports" subfolder.. Most comments have been removed (for posting) so it isnt so big.

I'm really struggling here to understand how the native reports can be used. I know I can create repots in a class fils and reference them, but that means a rebuild everytime I want to delpoy a new report.

Not sure if this is what you are after, but I used the following on a simple form with a button click to convert from the report .vb file to the new .trpt. With only 25 reports I just manually changed the report names and ran it.

My biggest problem now is with the viewer control, there are no working examples of how to replace the paramerter selector to a dropdown, or change the date format on the calendars. Not sure why the default parameter selectors are lists as these can be very long.

I have a Visual Studio solution that contains two different projects.One is a class library that I used to create a simple report that listsusers and some of their standard info. The DataSource for the report isa class with some hard coded data as a JSON string:

Usingthe report designer I have a simple report (UsersList.cs [Design] inthe AdventureWorksReports project) that uses the above GetUsers() methodfor populating the report. Nothing fancy, but it's displaying the data.

I'mhaving no success getting anything to display in a second project inthe solution. This second project is a .NET MVC web application. I have aReportController that inherits from ApiController to serve as thereporting server that does return the same JSON that works in the standalone report above:

This example demonstrates integration between the Telerik UI for Blazor and Telerik Reporting. Both the Blazor Grid and the Report Viewer are loaded into TabStrip tabs. The grid is the first tab open, and you can interact with it by applying filters, sorting and grouping. These operations are stored in the state of the Grid. This state is read and converted to JSON together with the data, which the Report Viewer uses to request a rendered report from the Report REST Service.

Could not find a declaration file for module '@progress/telerik-react-report-viewer/dist/cjs/main'. 'C:/Users/dnikolov/Desktop/ReactTypesScript/my-app/node_modules/@progress/telerik-react-report-viewer/dist/cjs/main.js' implicitly has an 'any' type. Try `npm i --save-dev @types/progress__telerik-react-report-viewer` if it exists or add a new declaration (.d.ts) file containing `declare module '@progress/telerik-react-report-viewer/dist/cjs/main';`Duplicated ItemsTypeScript definitions for the React Report ViewerAdd a CommentYour CommentAttach files(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)Post Comment3 commentsADMINDimitarPosted on:10 May 2023 15:36Hi Marcus,

Though, please keep in mind that besides this, you also need to make sure that the report viewer is not used in a component wrapped by the element, otherwise, the project will be compiled but there will be errors upon rendering.

The solution presented did not solve any issues. we are unable to get the TelerikReportViewer because the error shows as

TS7016: Could not find a declaration file for module '@progress/telerik-react-report-viewer'. 'C:/Users/Marcus.Whelan/source/repos/Express.CRP/UIWeb/express-ui/node_modules/@progress/telerik-react-report-viewer/dist/cjs/main.js' implicitly has an 'any' type. Try `npm i --save-dev @types/progress__telerik-react-report-viewer` if it exists or add a new declaration (.d.ts) file containing `declare module '@progress/telerik-react-report-viewer';`

And adding the declare statement below does nothing. Even changing the declare to match the import then the component gets an error about 'TS2607: JSX element class does not support attributes because it does not have a 'props' property.'

3a7c801d34
Reply all
Reply to author
Forward
0 new messages