locked
How to repeat two lists on each page? RRS feed

  • Question

  • User1426937062 posted

    Hi All,

    I am trying to create a report using two lists, One list shows Products Detail like Product name, rate, etc. Another list contains the Total Quantity, Total month sales etc. I have created two lists and displayed the data from two different queries but what happens the data in first list appeares on one by one in separate page and after completing first lists data starts another.

    I want this two lists should be repeated for each product one by one on each page like below:

    Page 1

    List 1 ------------------------

    Prodcut 1

    Name : ABC           Rate : 100unit     

    ------------------------------------

    List 2 ------------------------------

    Total Qty : 5000      Sold in current month : 3000

    --------------------------------------

    Page 2

    List 1 ------------------------

    Prodcut 2

    Name : XYZ           Rate : 200unit     

    ------------------------------------

    List 2 ------------------------------

    Total Qty : 9000      Sold in current month : 5000

    --------------------------------------

    Regards,

    Ravindra

    Monday, June 20, 2011 7:12 AM

Answers

  • User1426937062 posted

    One way I have done is kept two grids parallel to each other. And made a condition to break the page after each record. So both the lists looks like:

    Page1--------------------------------------------

    List1                                   List2

    Prod 1                                Total Qty Sold

    Name                                 Qty remianed

    Prod 2                                Total Qty Sold

    Name                                 Qty remained

    Page2--------------------------------------------

    List1                                   List2

    Prod 1                                Total Qty Sold

    Name                                 Qty remianed

    Prod 2                                Total Qty Sold

    Name                                 Qty remained

    It solves my prboblem in little way. But what if there is another list with above two lists???

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 21, 2011 9:16 AM

All replies

  • User-125547262 posted

    If you have a common key say the product id in both your list; you can use nested repeaters or list views to accomplish this

    http://leedumond.com/blog/nested-listviews-and-more-working-with-databound-controls-inside-the-listview/

    http://support.microsoft.com/kb/306154

    Monday, June 20, 2011 8:49 AM
  • User2105670541 posted

    in group properties of your second list, just set the page breaks and you are done

    Monday, June 20, 2011 12:32 PM
  • User1426937062 posted

    Thanks for response. I already added a page break in second list. Still not working.

    Tuesday, June 21, 2011 12:47 AM
  • User1426937062 posted

    Thanks Jeev,

    The tables in question are not exact, the result is like that I cannot combine in one query or there is no direct relation between two. So that's why I have two different queries and two diffferent lists.

    If any other way please help...

    Tuesday, June 21, 2011 1:20 AM
  • User1426937062 posted

    One way I have done is kept two grids parallel to each other. And made a condition to break the page after each record. So both the lists looks like:

    Page1--------------------------------------------

    List1                                   List2

    Prod 1                                Total Qty Sold

    Name                                 Qty remianed

    Prod 2                                Total Qty Sold

    Name                                 Qty remained

    Page2--------------------------------------------

    List1                                   List2

    Prod 1                                Total Qty Sold

    Name                                 Qty remianed

    Prod 2                                Total Qty Sold

    Name                                 Qty remained

    It solves my prboblem in little way. But what if there is another list with above two lists???

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 21, 2011 9:16 AM