Open dinonovak opened 5 years ago
We never move the stream cursor to position 0.
We uses the as below and never received any error.
List <MileageItem> dsMileageItems = new List<MileageItem>();
MileageItem newItem = new MileageItem();
newItem.CreatedAt = DateTime.Now;
newItem.EntryTime = DateTime.Now;
newItem.Mileage = 100000;
newItem.Note = "NewNote";
dsMileageItems.Add(newItem);
LocalReport localReport = new LocalReport("TestReport1.rdlc");
localReport.AddDataSource("DataSource1", dsMileageItems);
var result = localReport.Execute(RenderType.Pdf, extension);
return File(result.MainStream, "application/pdf", "Report.pdf");
Are you referencing System.Drawing.Common in your project?
We use Microsoft ReportBuilder 2016, It is simple application.
I got the same error after publishing a release of my website to the production server. An error occurred during local report processing.;The definition of the report 'SummaryReport.rdlc' is invalid. An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC30560] 'GeneratedCodeAttribute' is ambiguous in the namespace 'System.CodeDom.Compiler'.’.
The problem was the expressions. Don't use expression for calculation, show/hide controls, etc... Make your calculation in your app code behind and pass the result to a field Use this field in the control that will display the calculation result in the report That's the way I did to make it work for release till the package fully complete.
any fix suggested for: [BC30560] 'GeneratedCodeAttribute' is ambiguous in the namespace 'System.CodeDom.Compiler'. issue.
RDLC generation works on development machine, but when published on production server above error is generated
Make sure you installed "System.CodeDom" from Nuget and also "System.Data.SqlClient" then republish again to the production server.
Both nugets are included, but I am using expressions in report, no way to avoid them, so I susupect this could be issue. Any idea why expressions are such an issue?
yes it's an issue
I have the same error .Net core 3.1 API Any help ?
Any Help PLease : AspNetCore.Reporting.LocalProcessingException: 'An error occurred during local report processing.;An unexpected error occurred in Report Processing. Index was outside the bounds of the array.'
@AmirImam and @elmoslem
Check this rdlc-report-in-dotnet-core repository.
I have used the WCF service which is using the WebForms ReportViewer Control to "generate" the report. "I am not showing the report in the viewer but exporting report as PDF, Excel, Word etc"
This solution is much easier than all "available workarounds" specially when you are generating the report data in C #.
And you can also use the same solution for database data sources as WebForms ReportViewer will execute your report.
You can utilize all the feature which are supported WebForms ReportViewer control which mean all most all the feature
Same problem here. It works locally but when deployed in azure it gives an error. [BC30560] 'GeneratedCodeAttribute' is ambiguous in the 'System.CodeDom.Compiler' namespace.
I found this alternative repository and it worked perfectly for me https://github.com/lkosson/reportviewercore
@AmirImam i need Solve the problem , i used asp.net core reportibg rdlc
@elmoslem Yes me too. Didn't found any thing useful. I am still using WebForms project to display reports
Same problem here. It works locally but when deployed in azure it gives an error. [BC30560] 'GeneratedCodeAttribute' is ambiguous in the 'System.CodeDom.Compiler' namespace.
I found this alternative repository and it worked perfectly for me https://github.com/lkosson/reportviewercore
This was the answer to our problems. Thanks!
Both nugets are included, but I am using expressions in report, no way to avoid them, so I susupect this could be issue. Any idea why expressions are such an issue?
I have the same problem, you found the solution?
am trying to execute the report in .net core API project
here is the code:
But I am getting the following error:
An unhandled exception has occurred while executing the request. AspNetCore.Reporting.LocalProcessingException: An error occurred during local report processing.;The definition of the report 'TestReport1.rdlc' is invalid. An unexpected error occurred in Report Processing. Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libkernel32.dll, 1): image not found ---> AspNetCore.Reporting.DefinitionInvalidException: The definition of the report 'TestReport1.rdlc' is invalid. An unexpected error occurred in Report Processing. Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libkernel32.dll, 1): image not found ---> AspNetCore.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing.
Any help would be appreciated.
RDLC is created in Visual Studio 2017 (as part of Windows Application project 4.6.1) RDLC Report Designer is 14.2 RDLC is connecting to Dataset (XSD) that has Table Adapter in it that is connected to SQL Server
This is from RDLC file `<?xml version="1.0" encoding="utf-8"?>