Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Converting a customised report from classic client into RDLC in 2009 R2

Posted on by 1,745

Hi ,

I am trying to convert a customised report from from classic into rtc .i had even gone through the http://libertygrove.com/microsoft-dynamics-nav/converting-classic-reports-to-rdlc-part-1/ but i am very confused after reading this .it say it will create header automatically but in my case header is not comming

even the data which is coming is also wrong.i really dont know how to proceed

Thanks In Advance

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    Hi,

    It is better that you go through the any of the standard available RDLC report, which is bit similar in nature. This would help you to understand the coding pattern / report layouts & related designing.

    Also, go through the complete technical guide of creating / understanding RDLC reports for complete understanding. You need to spare sometime on the documentations before you start working on the actual reports.

    Regards,

    Vishal Salot

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    Its just not about copying code from section triggers to onaftergetrecord trigget. you need to check the logic of the report and write the code in correct trigger and sometimes we may have to redesign the code/logic

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    Hi ,

    i have these code in the presection of integer data item .

    CLEAR(SalesTax);

    CLEAR(ServiceCharge);

    CLEAR(FreightCharge);

    CLEAR(PackingCharge);

    CLEAR(TotalAmt);

    CLEAR("ST%");

    CLEAR("SrvT%");

    SalesHeader1.GET("Item Specification"."Document Type","Item Specification"."Document No.");

    SalesHeader1.CALCFIELDS("Amount to Customer");

    SalesLine1.RESET;

    SalesLine1.SETRANGE(SalesLine1."Document Type",SalesHeader1."Document Type");

    SalesLine1.SETRANGE(SalesLine1."Document No.",SalesHeader1."No.");

    IF SalesLine1.FINDFIRST THEN

     REPEAT

       IF SalesLine1."Tax Group Code" <> '' THEN

         "Tax%" := FORMAT(SalesLine1."Tax %");

         TaxAreaLine.SETRANGE("Tax Area",SalesLine1."Tax Area Code");

         IF TaxAreaLine.FINDFIRST THEN BEGIN

           TaxJuridiction.GET(TaxAreaLine."Tax Jurisdiction Code");

           TaxDetails.SETRANGE("Tax Jurisdiction Code",TaxAreaLine."Tax Jurisdiction Code");

           IF TaxDetails.FINDFIRST THEN

             IF (SalesLine1."Tax %" <> 0) AND  (SalesLine1."Form Code" = '') THEN

               "Tax%" := FORMAT(TaxJuridiction."Tax Type") + ' ' + "Tax%" +'%';

             IF (SalesLine1."Tax %" <> 0) AND  (SalesLine1."Form Code" <> '') THEN

               "Tax%" := FORMAT(TaxJuridiction."Tax Type") + ' ' + "Tax%" + '%' + ' Form ' + SalesLine1."Form Code";

         END;

       TotalAmt += SalesLine1."Line Amount";

       MESSAGE('TOTAMT:%1',TotalAmt);//JA

     UNTIL SalesLine1.NEXT = 0;

    StrOrdLineDtls.RESET;

    StrOrdLineDtls.SETRANGE(Type,StrOrdLineDtls.Type::Sale);

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document Type",SalesHeader1."Document Type");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document No.",SalesHeader1."No.");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Tax/Charge Type",StrOrdLineDtls."Tax/Charge Type":: "Sales Tax");

    IF StrOrdLineDtls.FINDFIRST THEN

     REPEAT

       "ST%" := StrOrdLineDtls."Calculation Value";

       SalesTax += StrOrdLineDtls.Amount;

     UNTIL StrOrdLineDtls.NEXT = 0;

    StrOrdLineDtls.RESET;

    StrOrdLineDtls.SETRANGE(Type,StrOrdLineDtls.Type::Sale);

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document Type",SalesHeader1."Document Type");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document No.",SalesHeader1."No.");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Tax/Charge Type",StrOrdLineDtls."Tax/Charge Type":: Charges);

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Tax/Charge Group",'SERVICE');

    IF StrOrdLineDtls.FINDFIRST THEN

     REPEAT

       "SrvT%" := StrOrdLineDtls."Calculation Value";

       ServiceCharge += StrOrdLineDtls.Amount;

     UNTIL StrOrdLineDtls.NEXT = 0;

    StrOrdLineDtls.RESET;

    StrOrdLineDtls.SETRANGE(Type,StrOrdLineDtls.Type::Sale);

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document Type",SalesHeader1."Document Type");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document No.",SalesHeader1."No.");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Tax/Charge Type",StrOrdLineDtls."Tax/Charge Type":: Charges);

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Tax/Charge Group",'FREIGHT');

    IF StrOrdLineDtls.FINDFIRST THEN

     REPEAT

       FreightCharge += StrOrdLineDtls.Amount;

     UNTIL StrOrdLineDtls.NEXT = 0;

    StrOrdLineDtls.RESET;

    StrOrdLineDtls.SETRANGE(Type,StrOrdLineDtls.Type::Sale);

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document Type",SalesHeader1."Document Type");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Document No.",SalesHeader1."No.");

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Tax/Charge Type",StrOrdLineDtls."Tax/Charge Type":: Charges);

    StrOrdLineDtls.SETRANGE(StrOrdLineDtls."Tax/Charge Group",'PACKING');

    IF StrOrdLineDtls.FINDFIRST THEN

     REPEAT

       PackingCharge += StrOrdLineDtls.Amount;

     UNTIL StrOrdLineDtls.NEXT = 0;

    DiscountAmount := TotalAmt - (SalesHeader1."Amount to Customer" -  SalesTax - ServiceCharge - FreightCharge - PackingCharge);

    IF ServiceCharge = 0 THEN

     ServiceChargeT := SalesHeader."Packing Charge"

    ELSE

     ServiceChargeT := FORMAT(ServiceCharge);

    IF FreightCharge = 0 THEN

     FreightChargeT := SalesHeader."Freight Charge"

    ELSE

     FreightChargeT := FORMAT(FreightCharge);

    IF PackingCharge = 0 THEN

     PackingChargeT := SalesHeader."Packing Charge"

    ELSE

     PackingChargeT := FORMAT(PackingCharge);

    i just copied these codes and paste it in the onaftergetrecord of integer data item ,but my values is not coming.

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    Hi Javed,

    The best way is to use the Create Layout Suggestion and make the necessary changes from there on.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    yes, true

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    Sir ,

    you mean to say i have to manually insert these codes in the onaftergetrecord trigger as create layout suggestion cannot automatically insert these codes in the onaftergetrecord trigger

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    we have to manually adjust the sections code.

  • javedakhtar Profile Picture
    javedakhtar 1,745 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    Hi Natalie

    i need to know when you are converting from classic into RTC ,what happen to code written in section of classic report ? in classic,there is some code in the integer table ,presection .but i cannot find these codes in onafterrecord of integer(RTC)

  • RE: Converting a customised report from classic client into RDLC in 2009 R2

    You need a programmer experienced with RDLC reporting for it.

    It's nothing you can get quickly support for by forum posts only.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Converting a customised report from classic client into RDLC in 2009 R2

    You have to click Create layout suggestion Under Tools option but it wont create 100% similar result as in Classic.

    You need to adjust the layout to match as in Classic.

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans