|
![]() |
#1 |
Участник
|
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; |
|
![]() |
#2 |
MCITP
|
![]() Цитата:
Сообщение от Dima_Dima
![]() 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; ![]() X++: display AccountNum customerId(ProjInvoiceJour _projInvoiceJour)
__________________
Zhirenkov Vitaly |
|
|
За это сообщение автора поблагодарили: Dima_Dima (1). |
![]() |
#3 |
Боец
|
Цитата:
2 Dima_Dima: У вас, как я понимаю, DAX2009? У меня, к сожалению, её нет под рукой. Но глядя на этот отчет в 4-ке, можно увидеть, что секция \Reports\ProjInvoice\Designs\Standard\Generated Design\Section Group: ProjInvoiceJour\Body:ProjectInvoiceJour\Section Group: ProjInvoiceEmpl может выполняться несколько раз для одного и того же projInvoiceJour, от которого зависит получаемый Вами _patID. Посмотрите строки отчета, где изменяется projInvoiceJour. Логичнее было бы разместить ваше поле на уровне секции "\Reports\ProjInvoice\Designs\Standard\Generated Design\Section Group: ProjInvoiceJour\Body:ProjectInvoiceJour" , но тут уже вопросы дизайна. P.S. Могу ошибаться. Последний раз редактировалось DSPIC; 23.04.2009 в 22:09. |
|
|
За это сообщение автора поблагодарили: Dima_Dima (1). |