Upgrade to .net 7 breaks reporting
Posted: Mon Mar 27, 2023 8:41 am
Hello I have been using the reports without any issues but upgrading an existing project to .net 7 breaks Report.Web.NetCore with this error :
Method not found: 'Void SixLabors.ImageSharp.Formats.Tiff.TiffEncoder.set_Compresion(System.Nullable '1)'
I am using the latest Nuget package 2023.2.1 application is asp.net 7, didn't change the reports that have been working perfectly since .net core 3.1
This is the relevant part of my code:
// Cumulative Receipt
case 4:
report.Load(Path.Combine(_hostingEnvironment.WebRootPath + $@"\Reports\PaymentReceipt.mrt"));
((StiPostgreSQLDatabase)report.Dictionary.Databases["IPCConnection"]).ConnectionString = connectionString;
report.DataSources["HeaderInfo"].Parameters["PId"].Value = pid;
report.DataSources["Payments"].Parameters["PId"].Value = pid;
StiImage stiImage = report.GetComponents()["Image2"] as StiImage;
string q = _hostingEnvironment.WebRootPath + $@"\images\pepperpike.png";
string z = _hostingEnvironment.WebRootPath + $@"\images\logoRC.png";
if (proptypeid == 1)
{
Image myImage = Image.FromFile(z);
stiImage.Image = myImage;
}
else
{
Image myImage = Image.FromFile(q);
stiImage.Image = myImage;
}
break;
Thanks in advance
Method not found: 'Void SixLabors.ImageSharp.Formats.Tiff.TiffEncoder.set_Compresion(System.Nullable '1)'
I am using the latest Nuget package 2023.2.1 application is asp.net 7, didn't change the reports that have been working perfectly since .net core 3.1
This is the relevant part of my code:
// Cumulative Receipt
case 4:
report.Load(Path.Combine(_hostingEnvironment.WebRootPath + $@"\Reports\PaymentReceipt.mrt"));
((StiPostgreSQLDatabase)report.Dictionary.Databases["IPCConnection"]).ConnectionString = connectionString;
report.DataSources["HeaderInfo"].Parameters["PId"].Value = pid;
report.DataSources["Payments"].Parameters["PId"].Value = pid;
StiImage stiImage = report.GetComponents()["Image2"] as StiImage;
string q = _hostingEnvironment.WebRootPath + $@"\images\pepperpike.png";
string z = _hostingEnvironment.WebRootPath + $@"\images\logoRC.png";
if (proptypeid == 1)
{
Image myImage = Image.FromFile(z);
stiImage.Image = myImage;
}
else
{
Image myImage = Image.FromFile(q);
stiImage.Image = myImage;
}
break;
Thanks in advance