Wednesday, 18 February 2015

Hello Guys..

Here i'm sharing steps how to add company logo to a ssrs report.

Step1 :

-> Add Extended Data Type "BitMap" to your table and name it as "CompanyLogo".
-> Add Extended Data Type "NoYesId" to your table and name it as "PrintLogo".

Step 2 :

-> Go to insert method of your ssrs report DP class and paste the below code before yourtable.insert();

if (conLen(FormLetter::companyLogo()) == 0)
    {
        yourtable.PrintLogo = NoYes::No;
    }
    else
    {
        yourtable.PrintLogo = NoYes::Yes;
        yourtable.CompanyLogo = FormLetter::companyLogo();
    }

//Note : Change table name

Step 3:
-> Edit your ssrs report design in visual studio.
-> Insert Image as shown in the below screen shot
-> Then go to image properties
-> In the properties go to "Use this field" and paste the below code and change the data set name

=IIF(First(Fields!PrintLogo.Value, "datasetname") = "Yes", First(Fields!CompanyLogo.Value, "datasetname"), "")

-> Select company logo type in the "Use this MIME type"
-> Save and then deploy the report ..

That's It ... :)


No comments:

Post a Comment