Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Create different sales-quote reports for different purposes

Posted on by 85

Is it possible to use different sales-quote reports for different purposes. Let's say I want to use a report for distribution and a different one for service. Can I switch between them when I create a new sales-quote record? Or can I create subsection for sales quote  where the user can create a specific sales record?

*This post is locked for comments

  • Yupp90 Profile Picture
    Yupp90 85 on at
    RE: Create different sales-quote reports for different purposes

    Hi,

    I haven't worked with Extensions yet, but I have found a different approach to solve my problem.

    I'm using the selection dialog to return an integer for the selected field.

    Since the differences between the sales - quote reports (there are only 3 reports) are slight, I'm using the integer to hide unnecessary informations.

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Create different sales-quote reports for different purposes

    Hi,

    Do you work with Extensions?

    If yes, then you have to make a new Action-button and copy accross the code.

    Add your code for the selection of the report (as described in the blog) and publish your extension.

  • Yupp90 Profile Picture
    Yupp90 85 on at
    RE: Create different sales-quote reports for different purposes

    Thanks a lot.

    I found a way to implement a selection dialog (community.dynamics.com/.../turn-report-selections-into-a-selection-dialog).

    Now I get the selected report of the selection dialog but since I can't implement the function into the document print code unit I have added the code to the first report that gets called.

    This is my selection dialog code, which I put into my OnInitReport function.

    ReportSelection.SETFILTER("Report ID", '<>0');

    ReportSelection.SETRANGE(Usage, ReportSelection.Usage::"S.Quote");

    IF ReportSelection.Count < 2 THEN

    EXIT;

    OptionStr := '';

    IF ReportSelection.FINDSET THEN

    REPEAT

       ReportSelection.CALCFIELDS("Report Caption");

       OptionStr += ReportSelection.Sequence + ' ' + ReportSelection."Report Caption" + ',';

       UNTIL ReportSelection.NEXT = 0;

    Selection := STRMENU(OptionStr, 1);

    If Selection = 0 THEN

       ERROR('');

    ReportSelection.FINDFIRST;

    FOR ReportIndex := 2 TO Selection DO BEGIN

       ReportSelection.NEXT;

       END;

    ReportSelection.SETRANGE(Sequence, ReportSelection.Sequence);

    ReportSelection.CALCFIELDS("Report Caption");

    CurrentReportID := COPYSTR(CurrReport.OBJECTID(FALSE), 1+STRPOS(CurrReport.OBJECTID(FALSE), ' '));

    SelectedReportID := FORMAT(ReportSelection."Report ID");

    IF CurrentReportID = SelectedReportID THEN BEGIN

       MESSAGE('Equal');

       END

    ELSE BEGIN

       MESSAGE('Not Equal');

       END;

    When I click on the print button I can select between 3 reports ("quote 1" -> calls the function, "quote 2", "quote 3").

    How can I print only the selected report?

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Create different sales-quote reports for different purposes

    Hi,

    Out of the box, you can configure reports based on the Document Type (Quote, Order, Invoice, Credit Memo).

    Search for "Report Selection".

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans