Показать сообщение отдельно
Старый 23.04.2009, 19:39   #11  
Dima_Dima is offline
Dima_Dima
Участник
 
144 / 11 (1) +
Регистрация: 09.10.2008
Цитата:
Сообщение от DSPIC Посмотреть сообщение
Если в отчете, то этим курсором служит имя датасорса квери.
ProjInvoice --> DataSource --> Query --> DataSource --> ProjInvoiceJour

X++:
display AccountNum customerId()
{
    SMAserviceOrderTable        smaserviceordertableloc;
    SMAServiceOrderLine         smaserviceorderlineloc;
    Name                             _patID;
    ProjInvoiceEmpl             projinvoiceemplloc;
    ;


    select firstonly CustAccount, ServiceOrderId from smaserviceordertableloc
        exists join serviceOrderId from smaserviceorderlineloc
            where smaserviceordertableloc.serviceorderid        == smaserviceorderlineloc.ServiceOrderId &&
                     smaserviceordertableloc.AgreementId        == smaserviceorderlineloc.AgreementId
        exists join TransId    from projInvoiceEmplloc
            where projinvoiceemplloc.TransId                    == smaserviceorderlineloc.ProjTransId
        exists join ProjinvoiceID from projInvoiceJour
            where    projInvoiceEmplloc.ProjInvoiceId           == projInvoiceJour.ProjInvoiceId;
                     
             

    _patID   = smaserviceordertableloc.CustAccount;
    

    return _patID;
так тоже никакого эффекта...