Tuesday, 28 April 2015

Show Binary Image in ASP.NET without using handler | Bind Binary Image in ASP.NET

Here we are going to bind the binary image from database.
Our binary image in in the varbnary(max) formatted in the database.

We Need to Add HTML Image control in design view:
<img runat="server" id="ProfileImage" />

And in code behind we have to add this:
First bind the Dataset and write below this code
byte[] imageBytes=Convert.ToBase64String((byte[])'DataSet Image Field');//replace DataSet Image field with varbinary Field.
ProfileImage.Src = "data:image/png;base64,"imageBytes;


You are done all the steps. The image will be display.

Monday, 30 March 2015

SSRS - Check Report Rendering Time

Here SQL Reporting Server have log our reports processing time in table and We have a View "ExecutionLog3" in SQL Server.

Following Query will gives us the total time (Minutes) taken by the SSRS report to generation.

This Query help us to find out the exact time of every stage.

  1. TimeDataRetrieval : Give us time to data retrieval by SQL Server
  2. TimeProcessing : Give us time processed to bind with the DataSet.
  3. TimeRendering : Give us time to rendering(Formatting) the SSRS report.


use ReportServer

select top 10 
  InstanceName,
  ItemPath,
  UserName,
  CAST((TimeDataRetrieval)as numeric(18,2))/60000 TimeDataRetrieval,
  CAST((TimeProcessing)as numeric(18,2))/60000 TimeProcessing,
  CAST((TimeRendering)as numeric(18,2))/60000 TimeRendering,
  CAST((TimeDataRetrieval+TimeProcessing+TimeRendering)as numeric(18,2))/ 60000 [Total_Time(Minutes)]
 from ExecutionLog3