Closed drechema closed 4 years ago
Tested with netcore2.1 framework and get same error
I also try in Windows and get same error
Hello! We fixed this error in the last MR https://github.com/FastReports/FastReport/pull/178. Nuget package version: 2020.2.9 (https://www.nuget.org/packages/FastReport.OpenSource/2020.2.9). Please, try this changes and share your opinion.
Hello @KirillKornienko, I have tested with release 2020.2.9 and works perfect !! Thanks a lot for your help
But after ... I tried to make more in the Script and I get this new error :-(
Exception has occurred: CLR/FastReport.Utils.CompilerException
An unhandled exception has occurred 'FastReport.Utils.CompilerException' in FastReport.dll
(83,22): Error CS0012: The type 'CollectionBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections.NonGeneric, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
(89,29): Error CS0012: The type 'IDynamicMetaObjectProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Dynamic.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
(109,21): Error CS0012: The type 'CollectionBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections.NonGeneric, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
(89,8): Error CS0012: The type 'IDynamicMetaObjectProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Dynamic.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
(116,22): Error CS0012: The type 'CollectionBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections.NonGeneric, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.'
en FastReport.Code.AssemblyDescriptor.InternalCompile()
en FastReport.Code.AssemblyDescriptor.Compile()
en FastReport.Report.Compile()
en FastReport.Report.Prepare(Boolean append)
en FastReport.Report.Prepare()
It seems quite similar problem... I don't know if I am doing something wrong...
Please, send us your sample report (*.frx) with this bug.
I have prepared a .frx that throw this error demo-win.frx.zip
I only added a function dealing with lists and arrays like this one:
private void AddTable(List<string[]> table){
TableObject tbl = new TableObject();
for (int icol=0;icol<4;icol++){
TableColumn col = new TableColumn();
tbl.Columns.Add(col);
}
foreach (var row in table){
TableRow tr = new TableRow();
tr.AutoSize = true;
for (int icol=0;icol<4;icol++) {
TableCell tc = new TableCell();
tc.Text = row[icol];
tr.AddChild(tc);
}
tbl.Rows.Add(tr);
}
tbl.Bounds = new RectangleF(NombrePrueba.Left, NombrePrueba.Bottom, Units.Centimeters * 10, Units.Centimeters * 0.5f);
tbl.CanGrow = true;
tbl.Top = 18;
DatosOrden.Objects.Add(tbl);
}
Thanks!
The above report runs fine form the designer (well... it's no pretty but works) but throw the error at Prepare method if is launched from code
Hello! In the latest update 2020.3.0, we fixed this problem. Please, try this changes and share your opinion.
Hello @drechema. Yes, dotnet add package FastReport.Compat --version 2020.3.2
before OpenSource version. This package is specified in the dependencies FastReport.OpenSource. It's strange that it does not load automatically.
Yes!! It's working After install this packages
dotnet add package FastReport.OpenSource --version 2020.3.1
dotnet add package FastReport.Compat --version 2020.3.2
the project is running and the report is showed !! Thanks a lot !!
@KirillKornienko everything works good but let me go ahead. What I need if a want to use another third party library inside the Report?
I tested adding:
using Newtonsoft.Json.Linq;
And then I have an exception:
An unhandled exception has occurred while executing the request.
FastReport.Utils.CompilerException: (13,6): Error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
at FastReport.Code.AssemblyDescriptor.InternalCompile()
But Newtonsoft.Json.dll
exist in the bin directory. Should I include the library in the project using nuget or similar?
Thanks again for your work
@drechema In the last update we made the automatic addition of assembly if they are known to .Net. In case of unknown assemblies, please add (do not replace) them in Report.ReferencedAssemblies before preparing the report (before Report.Prepare()).
Thanks, I think that the issue is closed !
<!DOCTYPE html>
Getting this error in 2022.2.11(regression?) on report.Prepare First time trying fast reports, not a happy experience with the opensource, its very difficult to find the code examples that work. ?? going to try the older version or get the open source code and compile
sorry used nuget and got opensource and compat Using winForms .net framework 4.6.1 and vs2022 ... trying to replace winforms reporting so I can upgrade it. 2021.3.1 appears to work for me.
I've built out a couple reports, and I'm able to test them outside of the application, but when I come into the application and go to Preview a Report, I'm getting an error:
I think that's probably because there's an error in an expression in the text object called Text2, and it doesn't like something about the Prefix field from one of my Data Sources called "Data" but I can't find any reason why that would be a problem. I'm sure it's probably some small setting I am unaware of, but I just don't know what that would be. The field is in the Report Title section of the report, and when I remove it, the error changes to the next text object that appears in the next section.
Hello,
I am running netcore 3 in Mac OSX
I made a simple report using Designer Community following documentation. The Script C# looks like this inside the .frx file:
The report works fine in Preview from Designer Community.
I developed a simple Web API project using netcore 3.1 following one of your samples. The API use PDFSimpleExport to generate a PDF from report:
This code works perfectly with a report with no Scripting. But if I try with the before scripted report I have:
How can we add the reference to that assembly? How can we add the needed assembly referenced in the Report Script? Everything inside the Script is pure NetCore, I mean will run in any paltform?
Thanks