public void SetUp() { Monitor.Enter(_locker); _embeddedReportingServer = new EmbeddedReportingServer(3000); _embeddedReportingServer.StartAsync().Wait(); _reportingService = _embeddedReportingServer.ReportingService; }
public void SetUp() { Monitor.Enter(_locker); _embeddedReportingServer = new EmbeddedReportingServer(3000); _embeddedReportingServer.CleanServerData(); _embeddedReportingServer.StartAsync().Wait(); _reportingService = new ReportingService("http://localhost:3000"); }
public static void Main() { var embededReportingServer = new EmbeddedReportingServer() { PingTimeout = new TimeSpan(0, 0, 100) }; embededReportingServer.StartAsync().Wait(); var reportingService = new ReportingService(embededReportingServer.EmbeddedServerUri); reportingService.SynchronizeTemplatesAsync().Wait(); var rs = new ReportingService("http://localhost:2000"); var r = rs.GetServerVersionAsync().Result; var result = rs.RenderAsync("Report1", null).Result; Console.WriteLine("Done"); embededReportingServer.StopAsync().Wait(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); DbInterception.Add(new SchoolInterceptorTransientErrors()); DbInterception.Add(new SchoolInterceptorLogging()); //its important to set RelativePathToServer otherwise jsreport will run from bin folder //that would cause application recycle with every generated report var EmbeddedReportingServer = new EmbeddedReportingServer(){ RelativePathToServer = "../App_Data", StartTimeout = new TimeSpan(0,0,20)}; //wait for nodejs server to start EmbeddedReportingServer.StartAsync().Wait(); //synchronize local *.jsrep files with embedded server EmbeddedReportingServer.ReportingService.SynchronizeTemplatesAsync().Wait(); ReportingService = EmbeddedReportingServer.ReportingService; //alternatively you can also use a remote jsreport server on prem or even jsreportonline //ReportingService = new ReportingService("https://test.jsreportonline.net", "username", "password"); //ReportingService.SynchronizeTemplatesAsync().Wait(); }
public void SetUp() { Monitor.Enter(_locker); _embeddedReportingServer = new EmbeddedReportingServer(3000) { Configuration = new { authentication = new { cookieSession = new { secret = "dasd321as56d1sd5s61vdv32" }, admin = new { username = "******", password = "******" } }, }, Username = "******", Password = "******" }; _embeddedReportingServer.StartAsync().Wait(); _reportingService = _embeddedReportingServer.ReportingService; }