Seal Report Forum
»
Report Edition
»
Reports
»
Unable to integrate reports in visual studio MVC
Rank: Newbie
Groups: Registered
Joined: 3/24/2020(UTC) Posts: 1 Location: London
|
When I am trying to integrate the reports in Visual studio using c#,MVC.
public ActionResult About() { ViewBag.Message = "Your application description page.";
Repository repository = Repository.Create(); Report report = Report.LoadFromFile(@"C:\ProgramData\Seal Report Repository\Reports\Customers.srex", repository); ReportExecution execution = new ReportExecution() { Report = report }; execution.Execute(); while (report.IsExecuting) { System.Threading.Thread.Sleep(100); } string resultPath = execution.GenerateHTMLResult(); Process.Start(resultPath);
return View(); }
After calling the execution.Execute() its throwing error like "Unable to find view template named Report".
Please let me know how to fix it.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
This is because the repository folder is incorrect or not installed (here the file Views\Report.cshtml is missing). Normally by default, it should be in 'C:\ProgramData\Seal Report Repository' however if you compile the source code in debug mode, it tries to find the repository beside a parent folder in order to use the repository of the project. Check the code in public static Repository Create() (Repository.cs). For production/release the repository path is specified in the .config file, so for the web.config: Code: <applicationSettings>
<Seal.Properties.Settings>
<setting name="RepositoryPath" serializeAs="String">
<value />
</setting>
</Seal.Properties.Settings>
</applicationSettings>
|
|
|
|
Seal Report Forum
»
Report Edition
»
Reports
»
Unable to integrate reports in visual studio MVC
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.