Показать сообщение отдельно
Старый 03.03.2005, 07:28   #4  
bagyr is offline
bagyr
Участник
 
74 / 10 (1) +
Регистрация: 15.02.2005
Адрес: Томск
Удалил полностьб все датасорсы и сделал 3 программируемых секции. Вот как получилось:
PHP код:
    s1 "";
    while
        
select Name from il
            order by Name
        join Prime_Price
DeportId_ProductionQuantity from cpp1
            where il
.InventLocationId == cpp1.Deport
                
&& cpp1.Calc_Month == str2date("01/10/2004"123)
                && 
cpp1.Id_stuff == 0
        join ItemName from it1
            order by ItemName
            where cpp1
.Id_Production == it1.RGUID
                
&& it1.RxPack == 0
    
{
        if (
s1 != il.Name)
        {
            
s1 il.Name;
            
mmDep il.Name;
            
element.execute(1);

            
element.executeControlColumnHeadings(2);
        }
        
mmPName it1.ItemName;
        
mmPrime cpp1.Prime_price;
        
element.execute(2);

        
element.executeControlColumnHeadings(3);
        while
            
select Cust_PriceQuantity from cpp2
                where cpp2
.Calc_Month == str2date("01/10/2004"123)
                    && 
cpp2.Id_Production == cpp1.Id_Production
                    
&& cpp2.Deport == cpp1.Deport
                    
&& cpp2.Id_stuff != 0
            join ItemName from it2
                order by ItemName
                where cpp2
.Id_stuff == it2.RGUID
                    
&& it2.RxPack == 0
        
{
            
mmSName it2.ItemName;
            
mmQty cpp2.Quantity cpp1.Quantity;
            
mmCPrice cpp2.Cust_price;
            
mmSumm mmCPrice mmQty;
            
element.execute(3);
        }
    } 
Для каждой mm* свой датаметод.