print on header in morphx reports

hello guys

i am new in ax 2009

i used this method for print morphx reports header but print wrong value

this is method…

display ItemNameDisplay itemType()

{

InventDim Inventdim1;

;

select Inventsizeid from inventdim1;

return inventdim1.InventSizeId;

}

give me suggetion

thanks

ali

Your code finds the first dimension in database and returns its InventSizeId. There is no variable, therefore it will always returns the same value.

You said it’s wrong but you haven’t mentioned what’s the correct behavior you’re trying to implement.

hi

please used following code

display str Item_name()

{

InventTrans inventTrans;

InventDim inventDim;

;

select inventDim where inventDim.inventdimid== inventTrans.inventdimid;

return inventdim.InventSiteId;

}

i hope this code is helpful for u…

}