Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

How to print report in seprate pages based on condition

Posted on by 5,901

Hi All,

Can you please let me konw. I have a customized form "PurchaseOrderQty".

7140.W1.jpg

Suppose user selected both lines and clicked OK then it will generate SSRS report.

7140.W2.jpg

Logic : 

So, report should generate 5 pages because we haveing 2 lines with total QTY= 5

Report should generate in below format :
2 separate pages for item id RMG...006
3 seprate  pages for item id RMG...OLD

*** I only wants to know the logic how i will generate SSRS report 5 pages for respective itemid ? rest logic i will do.

Please give me more shed on this.

Thanks!

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: How to print report in seprate pages based on condition

    Hi @rp@n,

    Do you have fields like NoOfXXX in your table?
    Vianney means to distinguish in order of quantity, such as RMG006, quantity 2, corresponding to RMG006-1, RMG006-2.

    Then you group by the ID and the newly added field.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How to print report in seprate pages based on condition

    Kindly elaborate me

    Not understsnd.

    Why I need to ADD NEW field???

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to print report in seprate pages based on condition

    Hi,

    Just add a new field and set increasing value 1,2,3,... and group on it

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How to print report in seprate pages based on condition

    Thanks Vianney,

    Could you please let me know in which field we need to make group by based o  my above example.

    Need to write any expression...

    Please give me more she'd on this

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to print report in seprate pages based on condition

    You should use while loop to insert 5 records to temp table. and group by each line.

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: How to print report in seprate pages based on condition

    Hi @rp@n,

    Have you tried Group By?

    Please refer this: https://stackoverflow.com/questions/30532745/ssrs-multiple-page-for-each-datasets-row

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How to print report in seprate pages based on condition

    Thanks Blue,

    I am not looking for number.

    Requirement is :

    Suppose in form I have 2 label qty for respective item number. Then user select that item id and clicked OK. ( Please refer pic above ).

    Then what is my requirement :

    1. It should insert record in Temp table based on label qty for that particular item number .

    For example: if label qty = 2 then it should insert record in Temp table 2 lines (rows) for same item id.

    2. I need to print those 2 (rows) item id with label qty and other fields... in separate pages. Means in 2 pages.  ( The number of pages is always equal to Label Qty).

    I hope you understand now.

    Please give me more she'd on this

    Thanks!

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: How to print report in seprate pages based on condition

    Hi @rp@n,

    Looking at some of your dialogues above, do you want to set a number for each report page and then distinguish different pages according to the number?
    Here's a suggestion: Create an ID that is not related to report server metadata.


    You can refer this: https://stackoverflow.com/questions/18724628/how-to-id-all-the-ssrs-reports

    I hope it will help you.

  • guk1964 Profile Picture
    guk1964 10,877 on at
  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How to print report in seprate pages based on condition

    Suppose in 1st line I have 2 quantity.

    So, obviously it's inserted record 2 times in temp table based on while condition for respective item id.

    Means while ( qty > labelQty)

    {

        Insert in to tempt table

    }

    Please let me know how I will print report in 2 pages for same item id.?

    @@ I need to check recid for those two lines to  print report in separate pages?

    Please let me know the expression and where to write the code exactly so it will print report in 2 pages?

    Please give me more she'd on this.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans