reportviewercore
reportviewercore copied to clipboard
Blazor Web Assembly Support.
Hi @lkosson,
Am trying to generate report in Blazor Client side (WebAssembly), Got Unsupported platform exception. Do you have any roadmap to to support webassembly (Mono engine)?
Easwar
Hello,
Please provide a full stack trace of the exception. I know little about Blazor, but chances of RV compiled to WebAssembly working are slim; most likely limited to HTML, DOCX and XLSX formats only - mostly due to heavy reliance on native Windows DLLs for page layout and typography.
Hi Sample code in written i a .razor page
And the error is like as follows
All in Textual format
Note :- I also tried with html, excel format also... Same error.
Regards, Easwar
Most likely ReportViewer won't work in Blazor. While the error you've encountered can be fixed (call to Process.GetCurrentProcess() can be removed or guarded when running in Blazor), report compilation using Roslyn won't work due to issues similar to reported in #49 regarding single-exe deployment.
Nevertheless, I'll fix the call in upcoming version. Perhaps at some time I'll come up with a solution to both issues.
@lkosson , Thanks for prompt reply. Let the Issue open. Will try to fix the problem. This would help a lot for rendering report using the local processing power instead of server resources.
Thanks & Regards, Easwar
Apart from bypassing Process.GetCurrentProcess()
, Blazor support requires changes to ExprHostCompiler
and VBExpressionCodeProvider
to pass runtime and user DLL references to Roslyn compiler in a way that is mutually exclusive with the one used now. It might be possible to fork the ReportViewer to target Blazor environment, but as of now, I see no way of providing a single .nuget package which works both in Blazor and .NET Core.
I'll leave the issue open, perhaps someone can pick it up and maintain such fork of this project.
I'm working with it on Blazor Server Side, API .NET Core and Front End in Blazor Server Side. This work perfectly, try to put the report.rdlc on [wwwroot] folder in the API project:
Then, in the , create a generic report base, in the controller just call this report base.
then from the controller call the report
Sorry for the spanish words on the pics