Friday, 14 November 2014

How To Add Company Logo To SSRS Report

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 ... :)




@ Rahul Talasila

Monday, 3 November 2014

How To Show Limited Records In a Form Info Part

Hello...!

In this post i'm going to show how to show Limited Records In a Form Info Part.

Example : Top 10 Vendors (AP-> Vendors)


In this example i'm going to show only top 5 vendors

Steps :
-> Open related info part(VendTop10VendorsByPurchase)
-> Go to infopart(VendTop10VendorsByPurchase) Properties and change Caption to Top 5 Vendors
-> Expand infopart(VendTop10VendorsByPurchase) ->Layout-> Main properties and change Rowcountwhensmall 10 to 5
->save and close .



Now we can see only 5 records... :)



@ Rahul Talasila

There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SRSQueryBuilderArgs'

There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SRSQueryBuilderArgs'........................................

Some times we get the above error while running reports in Axapta 2012. To resolve this issue we need to delete usage data in the AOSserver.


Solution : 

Step 1 -> Connect to sql server and go to axapta database(MicrosoftDynamicsAx) and delete all records in dbo.SYSCLIENTSESSIONS table.

Step 2-> Close the AX 2012 client to clear any in-memory elements.

Step 3-> Stop the Microsoft Dynamics Server service on the Application Object Server (AOS) to clear any in-memory elements.

Step 4-> Delete the application element cache files (*.auc),(*.KTI) from the Local Application Data folder.

C:\Users\AOSAccount\AppData\Local  (Delete the all the AUC and KTI files)

Step 5-> Delete VSAssemblies from the Local Application Data folder.

C:\Users\youruserid\AppData\Local\Microsoft\Dynamics AX\VSAssemblies

Step 6-> Start the service




Note : Make sure show hidden files,folders,and drivers option enabled

@Rahul Talasila

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...