Report.Prepare throws exception
lloydchriswilson opened this issue · comments
I am using open source version and trying to create a simple report (.fpx) from a template I created using the community designer (.frx). I want to be able to create an frx file using the designer but launch that report from my program substituting data having the same schema but filtered by my user. My frx file just connects to a sql server instance and displays selected fields from a table using a SQL query like (select a,b,c from table1). The preview in the designer looks fine.
Then in my VB.Net program (FR installed using latest version in Nuget) I want to convert the frx to fpx so that I can display it using the community viewer. My pseudocode looks like this:
dim report as new fastreport.report
report.load(frxname)
(create datatable dt containing identical data as used in frx)
report.registerdata(dt,"MyTable")
if report.prepare then report.saveprepared(fpxname)
At the report.prepare statement I get this error:
System.TypeLoadException: 'Method 'GetLineMappings' in type 'ParsedSyntaxTree' from assembly 'Microsoft.CodeAnalysis.CSharp, Version=3.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.'
I suspect that the Nuget package version has incompatible referenced libraries. I tried to roll back to older versions but got different errors each time.
I am using the latest version 2023.1.13 installed using Nuget.
Thanks in advance,
Chris
Hello!
Have you installed the nuget package
which is responsible for connecting FastReport to your SQL?
Best regards
Marat