2 loops in a table?

AlkroAlkro Member Posts: 115
I have a table like "Item Ledger entry".

Another table with maximum consumption with (Month, Item, Quantity).

I want create a Report with all item ledger entries ordering by: First i have to see item that appear in Table 2 and then items that not appear.

How can i do it.

I think is possible doing 2 loops in Table 1. First shows items that appear, and then the others one, but... ¿How? If a put 2 dataitems is not work fine.

Regards

Comments

  • matttraxmatttrax Member Posts: 2,309
    I wouldn't loop through it twice as that will take twice as long (although the extra code for my suggestion may negate that).

    Loop through it once. If it should be shown in the first section, show it. If not, put it in a temp table. Then show all items in that temp table.

    So you'd have something like:

    Consumption
    Item Ledg
    Temp Item Ledg
Sign In or Register to comment.