logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ebeigh  
#1 Posted : Thursday, July 16, 2020 4:09:21 PM(UTC)
ebeigh

Rank: Newbie

Groups: Registered
Joined: 7/16/2020(UTC)
Posts: 0
United States
Location: Pennsylvnia

I'm trying to integrate SealReport into a separate C# project in order to generate reports from a CSV file that is generated by my application. I've imported the SealLibrary DLL, as well as any assemblies that it depends on, and wrote some code to generate a report:

Code:
public void GenerateSealReport(string ReportFileLocation)
{
    Repository SealRepo = Repository.Create();
            
    Report report = Seal.Model.Report.LoadFromFile(ReportFileLocation, SealRepo);

    // these few lines reference ReportViewerForm.cs in SealLibrary from the seal source code
    Seal.Model.ReportExecution reportExecution = new Seal.Model.ReportExecution() { Report = report };
    report.InitForExecution();
    reportExecution.RenderHTMLDisplayForViewer();
    string url = report.HTMLDisplayFilePath;
    ConvertHtmlToPDF(url, @"\Reports\" + Path.GetFileNameWithoutExtension(ReportFileLocation) + "_" + String.Format("{0:yyyyMMddHHMMss}", DateTime.UtcNow) + ".pdf");
}


The ConvertHtmlToPDF method is something that I wrote and I have verified that it works.

Every time that code is run, I get a pdf result saved to the location I'm expecting, but the pdf has a bunch of exception messages in it. I've copy-pasted the text from the result below, If anyone can help at all with diagnosing the problem, any help would be appreciated.

Code:
Execution error when compiling the partial view template 'View(Report.iRestrictions)':
'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)

'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)
Line 109 Column 175 Error Number CS1061

Error got when executing the view 'View(Report)':
'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)

'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)
Line 109 Column 175 Error Number CS1061

Execution error when compiling the partial view template 'View(Report.iRestrictions)':
'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)

'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)
Line 109 Column 175 Error Number CS1061

Error got when executing the view 'View(Report)':
'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)

'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)
Line 109 Column 175 Error Number CS1061


Execution errors:
Execution error when compiling the partial view template 'View(Report.iRestrictions)':
'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)

'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)
Line 109 Column 175 Error Number CS1061

Execution error when compiling the partial view template 'View(Report.iRestrictions)':
'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)

'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)
Line 109 Column 175 Error Number CS1061

Error got when executing the view 'View(Report)':
'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)

'Seal.Model.ReportRestriction' does not contain a definition for 'HasOperator' and no extension method 'HasOperator' accepting a first argument of type 'Seal.Model.ReportRestriction' could be found (are you missing a using directive or an assembly reference?)
Line 109 Column 175 Error Number CS1061


Execution messages:
11:30:33 AM Rendering report...

epf  
#2 Posted : Friday, July 17, 2020 7:38:04 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
it looks like the template compilation fails...
HasOperator does not exist anymore in the current GitHub version (in development), so you should use the 5.5 dll to make it works (publish as a NuGet package).

Note:
You may use https://sealreport.org/Recipes#lineIntegration to execute your report.
You can also buy the PDF Converter from Ariacom, it will be fully integrated in the product and you will sponsor Seal Report.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.