All Archives in this blog may be used for the Junior,Dummies or someone who just started for career at Dynamics Ax ... A Place Where U can Start ur Code - right here ...
Rabu, 11 Mei 2011
TextBuffer at Dynamics Ax and my Foolishness
spAXrrttaaaaannnn!! ...
So ... this is my foolishness at my work ...
My friend erick want me to help him to produces some report which display a comment from user's input. so I used Memo for the String length in order to handle a possibility of length from the comment ... coz the comment may be like a story, have many paragraph. But unfortunately after the report is running there's some paragraph not displayed at the report and its because the height of the object who generated from EDT which is have lenght memo. in other word the object's height(which is generated from String) is not dynamic
So i use TextBuffer Class to handle this problem.
Here we are ... the TextBuffer ...
public class ReportRun extends ObjectRun
{
transdate Fromdate, Todate;
dialogfield dialogfromdate,dialogtodate,dialogComment;
transdate tempDate;
CustAccount tempCustAccount;
qty tempQty;
qty tempQtyconv;
str tempitemid;
IBMKeterangan Keterangan;
int i;
int panjangstr;
//TextBuffer Class
TextBuffer tb;
}
at Fetch
public boolean fetch()
{
boolean ret;
tb = new TextBuffer();
element.query().dataSourceNo(1).addRange(fieldnum(salesline,ShippingDateConfirmed)).value(strfmt('%1..%2',fromdate,todate));
tb.setText(Keterangan);
panjangstr = tb.numLines();
DistempKeterangan.height(panjangstr,units::char);
ret = super();
return ret;
}
Wait ..so where the Foolishness???
Here is the Foolishness ... to Handle the Dynamic Height's object you don't have to use TextBuffer class because Microsoft Dynamics Ax have a feature for this issue.
You can find the solving problem in a properties from the object which is generated from the variable that u have.
just right click from the object -> properties -> and voila ..there's a DynamicsHeight.
Change the DynamicsHeight to Yes.
Waakakkak .. Damd it!.
Langganan:
Posting Komentar (Atom)
Erorr CS1963 - An expression tree may not contain a dynamic operation.
Kali ini saya mendapatkan erorr dengan code CS1963, padahal sebelumnya saya sudah mendefinisikan 'var item in Model' di @foreach(var...
-
My code here is to copy Purchase Agreement line from reference Purchase Agreement to new Purchase Agreement. static void PSMCopydirecttoag...
-
If you want to try custom your notification, AX Standard can bring the user to the form where the information exist but when the form was...
-
"Error while setting server report parameters. Error Message: The item ´/DynamicsAx/PurchPurchaseOrderreport.Report4´ cannot be found ...
Tidak ada komentar:
Posting Komentar