web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Suggested Answer

while posting Packing slip -- Cannot render the report to the screen when running in non-client mode

(0) ShareShare
ReportReport
Posted on by

Cannot render the report to the screen when running in non-client mode (for example, in batch or in IL). Change the print destination to a location other than the screen. For example, a printer, file, or email.

here is my logic please update me thanks in advance

AxdSalesPackingSlip SalesPackingSlip = new AxdSalesPackingSlip();
AxdEntity_SalesParmTable SalesParmTable = new AxdEntity_SalesParmTable();
SalesParmTable.SalesName = "Pelican Wholesales";
SalesParmTable.SalesId = orderId;
SalesParmTable.DeliveryName = "Pelican Wholesales";
SalesParmTable.CustAccount = "903742";
SalesParmTable.DlvMode = "11";
SalesParmTable.InvoiceAccount = "903742";
SalesParmTable.CurrencyCode = "USD";
SalesParmTable.TransdateSpecified = true;
SalesParmTable.ParmId = "000232_205";
SalesParmTable.InventSiteId = "1";
SalesParmTable.Ordering = AxdEnum_DocumentStatus.PackingSlip;

AxdEntity_SalesShippingStat SalesShippingStat = new AxdEntity_SalesShippingStat();
SalesShippingStat.Quantity = 3;
SalesShippingStat.SalesId = orderId;

SalesParmTable.SalesShippingStat = new AxdEntity_SalesShippingStat[] { SalesShippingStat };
AxdEntity_SalesParmLine SalesParmLine = new AxdEntity_SalesParmLine();
SalesParmLine.DeliveryName = "Pelican Wholesales";
SalesParmLine.LineNum = 1;
SalesParmLine.LineNumSpecified = true;
SalesParmLine.ItemId = "taskId";
SalesParmLine.LineAmount = 31;
SalesParmLine.CustAccount = "903742";
SalesParmLine.InvoiceAccount = "903742";
SalesParmLine.OrigSalesId = orderId;
SalesParmLine.DlvMode = "10";

SalesParmLine.InventTransId = "00172220_068";

SalesParmLine.PackingUnitQty = 1;
SalesParmLine.PackingUnitQtySpecified = true;
SalesParmLine.ParmId = "000232_205";
SalesParmLine.LineAmountSpecified = true;
SalesParmLine.DeliverNow = 1;
SalesParmLine.DeliverNowSpecified = true;
SalesParmLine.InventNow = 1;

SalesParmTable.SalesParmLine = new AxdEntity_SalesParmLine[] { SalesParmLine };

SalesPackingSlip.SalesParmTable = new AxdEntity_SalesParmTable[] { SalesParmTable };


CallContext callContext = new CallContext();
callContext.Company = "ceu";


SalesPackingSlipServiceClient proxy = new SalesPackingSlipServiceClient();

EntityKey[] entityKey = proxy.create(callContext, SalesPackingSlip);

if (entityKey.Length > 0)
{
return true;
}
return false;

*This post is locked for comments

I have the same question (0)
  • Ivan (Vanya) Kashperuk Profile Picture
    on at

    That is expected. How can you show the report on the screen, when there is no screen to show it on?

    When the processing is running on the server or in IL, there is no client => there is no screen to show stuff on.

    You should do as suggested and use either a printer, a file or send the report in an e-mail

  • Community Member Profile Picture
    on at

    Hi Ivan Kashperuk,

    Thanks for reply

    i am doing through service how can i print it ,please suggest me the way how can i send an e-mail or download the file into AX server. 

  • Suggested answer
    Amir Nazim Profile Picture
    5,994 on at

    check links below. you can use as an example.

    directing reports to email

    blogs.msdn.com/.../how-to-directing-reports-to-email.aspx

    sending report to file

    blogs.msdn.com/.../how-to-sending-reports-to-file.aspx

  • Community Member Profile Picture
    on at

    Hi Amir,

    Thanks for you reply

    i fallowed the links what you suggested but in that way i have to code in X++, i don't have access to that

    is it not possible to do through web service.

    Just i need to post a packing slip i don't have any problem if i don't get print or file download or an e-mail.

    Please suggest me the way how can i do my need.

  • Suggested answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi Naresh

    Take a look at technet.microsoft.com/.../aa576993.aspx, AIF section.

    Practically, you can activate the flag "Print Packing Slip" on the Accounts Receivable Parameters form, Tab AIF

    Finally, on Form Setup, Print Management, Sales Order Packing Slip you are able to choose the print destination.

  • Community Member Profile Picture
    on at

    Hi Denis,

    Thanks for your support

    i got the point what you said but how can i check those check boxes through my logic am strolling for that. please see my logic and correct me.

    Thanks,

    Naresh.Sangana

  • Denis Macchinetti Profile Picture
    16,444 on at

    Hi Naresh

    If it's the unique case where you are using the AxdSalesPackingSlip  class, you can handle the print process by setup, without any code.

    Alternatively, you could modify the AxdSalesPackingSlip class and add a new method where set the print options.

    Finally, call this method from your service.

  • Community Member Profile Picture
    on at

    Hi Denis,

    That comes from service i don't have the permissions to change x++.

    i got the plan if i set the "Print Packing Slip and Use Print Management destination " check boxes to true through my service it will work.

    but i didn't get any  data about those check boxes. Please update me how to fill those fields.

    Thanks

    Naresh.Sangana

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans