Month: June 2017

Report printing Extra page

Hi, If report printing extra page please check below logic.

Body Width <= Page Width – (Left Margin + Right Margin)

Horizontal usable area:

X = Page.Width – (Left Margin + Right Margin + Column Spacing)

Vertical usable area:

Y = Page.Height – (Top Margin + Bottom Margin + Header Height + Footer Height)

Any time objects on your report (including the Body itself) extend past the usable area either because they are defined like that or because they grow at runtime, the physical page renderers have no choice but to break onto a new page.

Advertisements

SQL in X++, range in where clause

Below case is when ‘AccessFeedsFilter’ has value it should fetch that reocrds only if its empty: it should fetch all

 

while select SKUNumber, ItemId, inventDimId,LifeCycleStatusFlag,ItemName, InboundDepth, InboundHeight, InboundWeight, InboundWidth,
OutboundDepth, OutboundHeight, OutboundWeight, OutboundWidth, ActualDepth, ActualHeight, ActualWeight, ActualWidth, RetailVariantId, Description, BasePrice
from productsAndVariants
where (productsAndVariants.LifeCycleStatusFlag == ogoParameters.AccessFeedsFilter && ogoParameters.AccessFeedsFilter != “”) || (ogoParameters.AccessFeedsFilter == “” && true)

Split text multiple lines in Email body

HI, Below smaple code used to show splited text in email body.

{

SysMailer mailer;
SysEmailParameters parameters;
InteropPermission permission = new InteropPermission(InteropKind::ComInterop);
OWIStoreTable OWIStoreTable;
Notes bodymsg, bodymsghtml;
ListIterator iterator;
List strlist=new List(Types::String);
;
permission.assert();
mailer = new SysMailer();
parameters = SysEmailParameters::find();

if (parameters.SMTPRelayServerName)
{
mailer.SMTPRelayServer(parameters.SMTPRelayServerName,
parameters.SMTPPortNumber,
parameters.SMTPUserName,
SysEmailParameters::password(),
parameters.NTLM);
}
else
{
mailer.SMTPRelayServer(parameters.SMTPServerIPAddress,
parameters.SMTPPortNumber,
parameters.SMTPUserName,
SysEmailParameters::password(),
parameters.NTLM);
}

mailer.fromAddress(‘test@AX.com’);
mailer.tos().appendAddress(‘AAA@gmail.com’);
mailer.subject(‘System Test’);

strlist =strSplit(‘AAA  BBB’,”\n”);

iterator = new ListIterator(strlist);

while(iterator.more())
{
bodymsg += strFmt(“%1<br>”,iterator.value());
iterator.next();
}

bodymsg = strReplace(bodymsg,’\n’,'<br>’);
bodymsg =bodymsg + “\n” + strFmt(“Last order %2 received for this webtore on: %1”, _lastSalesOrder.createdDateTime);

bodymsghtml= strFmtLB(bodymsg);

mailer.htmlBody(bodymsghtml);

mailer.sendMail();
}