I want to run the print order when I type this url and print my desired document.
This is the url that calls this method:
http://localhost:9090/api/printPage
Api method
[HttpGet]
[Route("PrintPage")]
public boolean PrintPage()
{
try
{
var p = new List<Person>()
{
new Person() {Id = 1, FirstName = "omid", LastName = "nasri", Gender = true}
, new Person() {Id = 2, FirstName = "hana", LastName = "akbari", Gender = false}
, new Person() {Id = 3, FirstName = "ali", LastName = "jahani", Gender = true }
, new Person() {Id = 4, FirstName = "sara", LastName = "sabori", Gender = false }
};
var mainReport = new StiReport();
mainReport.Load(@"D:\WebSite\Web\Print\Report.mrt");
mainReport.RegBusinessObject("persons" , p);
mainReport.Print(false);
return true;
}
catch (Exception ex)
{
return false;
}
}
I use stimulsoft 2012.1.