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)

Use Print Management Sales Confirm SSRS

(0) ShareShare
ReportReport
Posted on by 105

Hi everyone,


I want to use multiple design for different customer. I add a Field ConfirmSelect and add combobox in a SalesEditLines Form. That is working fine when i generate a confirm. But sometimes they need a print a Sales Confirmation in a two design or more. I add a button with dialog in  CustConfirmJournal in dialog i add a combobox with a Field ConfirmSelect from CustConfirmJour. But this dialog don't use a print Management and print a one design(SalesConfirm.Report) in a print managment i don't use that Report. I don't know why. In method CloseOk i add this code:

public void closeOk()
{
    CustConfirmJour     custConfirmJourLocal;
    Args                args             = new Args();
    RecordSortedList    journalList      = SalesConfirmJournalPrint::construct().newJournalList();
    #ISOCountryRegionCodes

    for (custConfirmJourLocal = getFirstSelection(custConfirmJour_ds);
         custConfirmJourLocal;
         custConfirmJourLocal = custConfirmJour_ds.getNext())
    {
        journalList.ins(custConfirmJourLocal);
    }
    journalList.first(custConfirmJourLocal);


args.record(custConfirmJourLocal);

new MenuFunction(menuitemOutputStr(SalesConfirmation), MenuItemType::Output).run(args);



super();
}


*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    what you want to do?

    running multiple designs at same time? or something else?

  • Mea_ Profile Picture
    60,284 on at

    You want to run specific design base on combo box ?

  • Mariano Gracia Profile Picture
    on at

    When I need to do something like you're talking about I use to add a new field on the table, in this case CustConfirmJour, call this field "DesignId", I use to add this field to the SalesParmTable so the user is able to modify the value before posting the document, and also I add a button in the journal (in this case CustConfirmJournal form) so the user can modify the "DesignId" value in the record itself, once you have done this modification you can use print management specifying conditional settings based on the new field "DesignId". It is easy to do, and you can apply it on any report that uses print management.

  • Krychul Profile Picture
    105 on at

    Thank you for answer,

    I add a field to CustConfrimJour and i Add a button with a form with three options

    Choice Language

    Choice DesignId

    Design with Comments

    And I have a problem beacuse this form don't use a Print Managment and print a SalesConfirm.Report and print with a bad information. I don't know why.

    Code CloseOk is in the first post.

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    you started coding  without answering the questions, we asked from you, and without thinking. We don't need to destroy existing CustConfrimJour  Table without analysis.

    again, can you answer what you want to do?

    1) I want to run design of user choice at run time.

    2) I want to run multiple designs of same report at runtime

    3) something else which you may describe

  • Krychul Profile Picture
    105 on at

    I want to run design of user choice at run time and choice the language.

  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Thank you for your making it clear for us.

    Read following two blog post

    Running a different design of a report-Part 1

    Running a different design of a report-Part 2

    These two have answer to your question. After reading, if you don't get the answer, get back on thread with your question.

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    It won't be easy but you can do next :

    1 ) On SalesEditLines form add new field for user to select report design and pass it to args in print journal method

    2 ) Modify SalesConfirmController class to look at args and switch design based on user selection

    3) Add dialog on confirmation journal button to allow user select report design and use same logic as for salesEditLines form.

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    also another thread here for you, as you might need following after reading above two blog  posts

    community.dynamics.com/.../465487

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    @ievgen Miroshnikov

    adding extra logic to SalesEditLines is not healthy as this form is used for multi-purpose such as confirmation, packing slip and invoicing. we should avoid such customizations which are effecting a commonly used interface. we can get  it by customizing only related report's controller class. adding customization to SalesEditLines  and CustConfrimJour  can be avoided here. you can provide a lookup of all designs related to one report inside controller class

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans