Dmitry_Zolotar, дякую за допомогу, але виникла інша проблема... В функції SetReportName при двох власниках (тільки якщо юридична та фізична особи разом) звіт (репортс) взагалі не зберігається... Можете надати приклад використання функції SetReportName??? І умова в IIF(I<>N,',','') чогось виконується навпаки???
function NNazva:String; var RayonnID,Ploshcha,Dott,Koma,Rozmir,Unittt,Rozm,Vykor,Namme,PPath,LnN,FnN,MnN,NpP,Nazzva:String; begin begin RayonnID:=Copy(CadNumberClear,1,5); if RayonnID='46203' then RayonnID:='певний район1_' else if RayonnID='46206' then RayonnID:='певний район2_' else if RayonnID='46221' then RayonnID:='певний район3_' else RayonnID:='_'; end; begin Ploshcha:=''; Koma:=','; Dott:='.'; Rozmir:=XPath('EmbeddedXML/UkrainianCadastralExchangeFile/InfoPart/CadastralZoneInfo/CadastralQuarters/CadastralQuarterInfo/Parcels/ParcelInfo/ParcelMetricInfo/Area/Size'); FoF:=Pos(Dott,Rozmir); Delete(Rozmir,FoF,1); Ploshcha:=Rozmir; Insert(Koma,Ploshcha,FoF); Ploshcha:=Ploshcha; Unittt:=Trim(XPath('EmbeddedXML/UkrainianCadastralExchangeFile/InfoPart/CadastralZoneInfo/CadastralQuarters/CadastralQuarterInfo/Parcels/ParcelInfo/ParcelMetricInfo/Area/MeasurementUnit')); Rozm:=Ploshcha+'_'+Unittt; end; begin Vykor:=XPath('EmbeddedXML/UkrainianCadastralExchangeFile/InfoPart/CadastralZoneInfo/CadastralQuarters/CadastralQuarterInfo/Parcels/ParcelInfo/CategoryPurposeInfo/Purpose'); if Vykor='02.01' then Vykor:='ОЖБ_' else if Vykor='01.03' then Vykor:='ОСГ_' else if Vykor='01.01' then Vykor:='ПАЙ_' else if Vykor='01.05' then Vykor:='САД_' else Vykor:='_'; end; begin Namme:=''; PPath:='EmbeddedXML/UkrainianCadastralExchangeFile/InfoPart/CadastralZoneInfo/CadastralQuarters/CadastralQuarterInfo/Parcels/ParcelInfo/Proprietors'; N:=NodesCount(PPath,'ProprietorInfo'); if N<1 then Exit; for I:=1 to N do if IsNodeExists(PPath+'/ProprietorInfo['+IntToStr(I)+']/Authentication/NaturalPerson')then Namme:=Namme+Trim(XPath(PPath+'/ProprietorInfo['+IntToStr(I)+']/Authentication/NaturalPerson/FullName/LastName'))+'_'+ Copy(Trim(XPath(PPath+'/ProprietorInfo['+IntToStr(I)+']/Authentication/NaturalPerson/FullName/FirstName')),1,1)+'_'+ Copy(Trim(XPath(PPath+'/ProprietorInfo['+IntToStr(I)+']/Authentication/NaturalPerson/FullName/MiddleName')),1,1)+'_'+IIF(I<>N,',','') else Namme:=Namme+Trim(XPath(PPath+'/ProprietorInfo['+IntToStr(I)+']/Authentication/LegalEntity/Name'))+'_'+IIF(I<>N,',',''); end; begin Nazzva:=RayonnID+'КП_'+Namme+Vykor+Rozm; end; Result:=Nazzva; end; SetReportName(NNazva);
|