Wednesday, 30 January 2013

SSRS Some Tips


For getting Month and Year :

=Monthname(Datepart("m",Fields!duedateValue.Value)) & " " & Datepart("yyyy", Fields!duedateValue.Value)

Result: May 2013.

Difference Between two Dates:

=DateDiff("d",Fields!tvsi_approveddateValue.Value,Fields!actualclosedateValue.Value)

it will give the
result : 2.


For Month only :

=MonthName(Month(Fields!datedeliveredValue.Value))

Wednesday, 16 January 2013

Runing Report on Selected Record


http://social.microsoft.com/Forums/en-CA/crmdevelopment/thread/34f44b87-8ef7-4b3c-8a3e-df22599277c5

first create a datasource.

creating dataset:

select * from filterednew_cool as CRMAF_filterednew_cool

then run and deploy the report.

we will get the option for selected records in running the report.

Wednesday, 9 January 2013

retrieve data of lookup field in crm 2011

for this we need to download the xrmservicetoolkit.

http://xrmservicetoolkit.codeplex.com/releases

after download we will get 3 .js files.
1. jquery.js
2.json2.js
3.xrmservicetoolkit.js

just add these three as webresource.

write on javascript function;


function AlertGUID() {

    var primaryContactGUID = Xrm.Page.data.entity.attributes.get("parentcustomerid").getValue()[0].id;
var cols=["lastname"];
var retrievedaccount = XrmServiceToolkit.Soap.Retrieve("account", primaryContactGUID, cols);
var name = retrievedaccount.attributes['lastname'].value;

   alert(name);

}

add these function as webresource.

add 
downloaded webresorce add to the form in onload.
and custom function will give on the onchage of lookup filed.

then run.
for debug. press F12 in the form and 
select your code on : Formscript 
click on debugg. put pointer.