sql server - SSRS web service Render method takes longer from code compared to manually hitting View Report from the URL -


has used render method ssrs web service reportexecution2005?

i noticed generating report code taking longer when report manually generated using url. there can configure/setup?

here's code used:

the code working it's performance noticeably slow , reports it's taking forever compared when it's run manually takes < 5 seconds.

        public byte[] getssrsinvoice(string invoicenumber)         {             byte[] reportbytes = null;             using (var webserviceproxy = new ssrswebreference.reportexecutionservice())              if (!string.isnullorempty(configurationmanager.appsettings.get("ssrsreportpath")) && !string.isnullorempty(configurationmanager.appsettings.get("ssrsuserdomain")) && !string.isnullorempty(configurationmanager.appsettings.get("ssrsusername")) && !string.isnullorempty(configurationmanager.appsettings.get("ssrsuserpassword")))             {                 string susername = configurationmanager.appsettings.get("ssrsusername");                 string suserdomain = configurationmanager.appsettings.get("ssrsuserdomain");                 string suserpassword = configurationmanager.appsettings.get("ssrsuserpassword");                 string reportname = configurationmanager.appsettings.get("ssrsreportpath");                 webserviceproxy.credentials = new system.net.networkcredential(susername, suserpassword, suserdomain);                  // init report execute                 executioninfo executioninfo = webserviceproxy.loadreport(reportname, null);                  parametervalue[] parameters = new parametervalue[3];                 parameters[0] = new parametervalue();                 parameters[0].name = "generic";                 parameters[0].value = invoicenumber;                 parameters[1] = new parametervalue();                 parameters[1].name = "type";                 parameters[1].value = "1";                 parameters[2] = new parametervalue();                 parameters[2].name = "paramtype";                 parameters[2].value = "1";                     // attach report parameters                 webserviceproxy.setexecutionparameters(parameters, null);                 string extension, mimetype, encoding;                 warning[] warnings;                 string[] streamids;                  // render                 reportbytes = webserviceproxy.render(exportformat.pdf.tostring(), null, out extension, out mimetype, out encoding, out warnings, out streamids);              }             return reportbytes;         } 

thanks!

when hit report view purpose url, executed in rpl render format. during step, report takes time 1. data fetch 2. , rendering

so total time taken (data fetch time + rendering time). export same report other format (like pdf/xls etc), total time (data fetch time during rpl render + rendering time during rpl render+ rendering time selected export format/render). note depend on selected export format, render time vary.

now if talk code using reportexecution2005, exporting report pdf format. in case total time (data fetch time + render/export pdf time +c# code execution time). based on this, able compare fair times between 2 different render same report.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -