please Help me to solve this issue on multi logo

Discussion in 'Tally Developer' started by abhinand vk, May 11, 2021.

    
  1. abhinand vk

    abhinand vk Active Member


    when I change the second image file path than the first image path also changing how to make those suprate


    upload_2021-5-11_16-1-44.png




    ;;;;this is my Code

    [#Report: Company Logo path]

    Variable: vCurrentPath2
    Set : SubFormTitle : @@CompanyDetails
    Set : vCurrentPath2 : If $$IsFileExists:##SALogoPath2 Then $$GetParentDirectory:##SALogoPath2 Else $$GetParentDirectory:mad:@CmpLogoPath2
    Set : vCurrentFile2 : If $$IsFileExists:##SALogoPath2 Then $$GetFileNameFromPath:##SALogoPath2 Else $$GetFileNameFromPath:mad:@CmpLogoPath2
    Local : Collection : File Selection Table2 : Add : Advanced : @@NonImgFiles2
    [#Report: Cfg ShowCompanyLogo]

    Use : OutputConfig Form
    Variable: vCurrentPath2
    Set : SubFormTitle : @@CompanyDetails
    Set : vCurrentPath2 : If $$IsFileExists:##SALogoPath2 Then $$GetParentDirectory:##SALogoPath2 Else $$GetParentDirectory:mad:@CmpLogoPath2
    Set : vCurrentFile2 : If $$IsFileExists:##SALogoPath2 Then $$GetFileNameFromPath:##SALogoPath2 Else $$GetFileNameFromPath:mad:@CmpLogoPath2
    Local : Collection : File Selection Table2 : Add : Advanced : @@NonImgFiles2
    [Variable: vCurrentPath2]

    Type : String

    [Variable: SALogoPath2]

    Type : String
    Persistent : Yes

    [Variable: vCurrentFile2]

    Type : String

    [System:Variable]
    vCurrentFile2:""
    vCurrentPath2:""
    SALogoPath2:$Logopath2:Company:##SvCurrentCompany
    [System:Formula]
    CmpLogoPath2 : $LogoPath2:Company:$$CurrentSimpleCompany
    ImagePath2 : $$LocaleString:"Second Image Path"
    ImageFileName2 : $$LocaleString:"Second Image File Name"
    IsCurrPathRoot2 : ($$IsSysNameEqual:Root:##vCurrentPath2)
    CfgLogoPath2 : $$GetFileFullPath:(#SALogoPathPopUp2 + "\" + #SALogoPath2)
    SALogoPathExist2 : If $$IsEmpty:mad:@SALogoPath2 then $$LocaleString:"Logo path cannot be empty." +
    Else If NOT $$IsFileExists:mad:@SALogoPath2 Then $$LocaleString:"Logo path specified is invalid or file not found." +
    Else If $$FileSize:mad:@SALogoPath2 > 1048577 Then "File size exceeds 1 MB." +
    Else $$LocaleString:"Format Not Supported"

    NonImgFiles2 : (If ##ShowMore OR $IsDirectory OR @@IsSysNameUp Then $IsHidden Else +
    If NOT $$IsEmpty:##vCurrentFile2 AND ##vCurrentFile2 = $Name Then No Else ($FileExtension NOT IN ("bmp", "jpg", "jpeg") OR $IsHidden))
    IsActiveObj2 : $IsActive AND NOT @@IsCurrPathRoot2
    PathDependencyFilter2 : ##vCurrentPath2 != ""
    FileTableDefaultCursor2 : If $$NumItems:FileSelectionTableForCount2 = 1 Then @@IsSysNameUp Else @@TableDefaultCursor

    [Collection: File Selection Table For Count2]
    Use : File Selection Table2
    [#Part: Company Logo path]

    Add:Line:After: CMP LogoAbsolutePath : Cfg LocationOfLogo2, Cfg LogoFileName2
    Local : Field : Medium Prompt : Width : @@LongWidth
    [#Part: Cfg ShowCompanyLogo]

    Add:Line:After:Cfg LogoFileName : Cfg LocationOfLogo2, Cfg LogoFileName2
    Local : Field : Medium Prompt : Width : @@LongWidth

    [Line: Cfg LocationOfLogo2]

    Fields : Medium Prompt, SALogoPathPopUp2
    Local : Field : Medium Prompt : Set as : @@ImagePath2
    Local : Field : Medium Prompt : Inactive : NOT #SACompLogo
    [Field: SALogoPathPopUp2]

    Use : Name Field
    Width : @@NarrWidth
    Set as : If @@IsCurrPathRoot2 Then "" Else ##vCurrentPath2
    Inactive : NOT #SACompLogo
    Skip : Yes
    [Line: Cfg LogoFileName2]

    Field : Medium Prompt, SALogoPath2, Cfg LogoAbsolutePath2
    Local : Field: Medium Prompt : Set as : @@ImageFileName2
    Local : Field: Medium Prompt : Inactive : NOT #SACompLogo
    Space Bottom : 0.25


    [Field: SALogoPath2]

    Use : File Selection Template2
    Width : @@NarrWidth
    Inactive : NOT #SACompLogo
    Control : SALogoPathExist2 : ($$IsEmpty:mad:@CfgLogoPath2 OR Not $$IsFileExists:mad:@CfgLogoPath2 OR ($$FileSize:mad:@CfgLogoPath2 > 1048577))
    Act on Table Element: (@ShowMore OR @ShowLess) : Execute Obj Actions : ShowMoreLess

    ShowMore : ($$IsSysNameEqual:ShowMore:($$CurrentTableObj:$Name))
    ShowLess : ($$IsSysNameEqual:ShowLess:($$CurrentTableObj:$Name))
    [Field: Cfg LogoAbsolutePath2]

    Use : Name Field
    Type : String : Forced
    Modifies : SALogoPath2
    Set as : @@CfgLogoPath2
    Storage : Logopath2
    Set Always : Yes
    Invisible : Yes
    [System:UDF ]
    Logopath2:String:1547
    [Field: File Selection Template2]

    Use : Name Field
    Set Always : Yes
    Width : @@LongWidth
    Delete : Case
    Show Table : Always
    Set as : ##vCurrentFile2

    Table : Current File Folder2, Provide File Path2, SelectFileDrives2

    Process Change Table: Yes

    Act on Table Element: @IsDirectory : Execute Obj Actions : Set File Directory

    Act on Table Element: @IsUp : Execute Obj Actions : Set File Parent Directory

    Act on Table Element: @IsRootSelected : Execute Obj Actions : Set File Root

    Act on Table Element: @SpecifyPath : Execute Obj Actions : Set Path

    Act on BackSpace : @@IsSysNameUp : Set File Parent Directory

    Default Table Item : @@FileTableDefaultCursor2

    IsDirectory : $$CurrentTableObj:$IsDirectory AND NOT @IsUp
    IsUp : $$CurrentTableObj:mad:@IsSysNameUp

    IsRootSelected : ($$IsSysNameEqual:Drives:($$CurrentTableObj:$Name))
    SpecifyPath : ($$IsSysNameEqual:providePath:($$CurrentTableObj:$Name))

    [Collection: Current File Folder2]

    Use : Current Path Details2

    Title : $$LocaleString:"File Selection"
    Object : Current File Path2
    Client Only : Yes
    Format : $Name, 35
    Table Sort : @@FileFolderFormat
    Advanced : $IsHidden

    ;;When vCurrentPath is set this collection needs to be regenerated. Setting dependency with Filter
    Filter : PathDependencyFilter2

    Explode : File Selection Table2

    [Collection: File Selection Table2]

    Use : Current Path Explode Details2

    Title : $$LocaleString:"File Selection"

    Data Source : File Selection List : ##vDataFolderPath2

    Format : $Name, 35
    Format : @@FileFolderFormat, 15
    Client Only : Yes

    Filter : NotSystemFolders

    [Collection: Current Path Explode Details2]

    Parm Var : vDataFolderPath2 : String : $$TableExplodeOwner:##vDataPath2
    Allow Noise Chars : Yes
    [Collection: Current Path Details2]

    Parm Var : vDataPath2 : String : If $$IsEmpty:##vCurrentPath2 Then @@RootName Else ##vCurrentPath2

    Allow Noise Chars : Yes

    [Object: Current File Path2]

    Behave As : Label
    Name : If @@IsCurrPathRoot2 Then $$SysName:primary Else ##vCurrentPath2
    Full Width : Yes

    [Collection: Provide File Path2]

    Title : $$LocaleString:"File Selection"
    Object : Provide File Path2
    Client Only : Yes


    [Object: Provide File Path2]

    Use : On The Fly Object
    Name : $$SysName:providePath
    IsActive : Yes

    Action : Set Path : Set : On The Fly Path : $$GetOnTheFlyString
    Action : Set Path : Set : On The Fly Path : If $$IsEmpty:##OnTheFlyPath Then "" Else $$GetFullPath:##OnTheFlyPath

    Action : Set Path : Do If : ($$IsDirectory:##OnTheFlyPath) : Set : vCurrentPath2 : ##OnTheFlyPath

    Action : Set Path : Do If : ((NOT $$IsDirectory:##OnTheFlyPath AND NOT $$IsFileExists:##OnTheFlyPath) OR $$IsEmpty:##OnTheFlyPath) : Alter : ProvideFilePath2
    Action : Set Path : Do If : ($$IsFileExists:##OnTheFlyPath) : Set : vCurrentPath2 : $$GetParentDirectory:##OnTheFlyPath
    Action : Set Path : Do If : ($$IsFileExists:##OnTheFlyPath) : Set : vCurrentFile2 : $$GetFileNameFromPath:##OnTheFlyPath
    Action : Set Path : Do If : ($$IsFileExists:##OnTheFlyPath) : ProcessOnTheFlyinFileSelection:##vCurrentFile2

    Action : Set Path : Do If : (NOT $$IsFileExists:##OnTheFlyPath AND (NOT $$IsEmpty:##vCurrentPath2 AND NOT @@IsCurrPathRoot2)) : Change Table : $$CurrentTable : No : @@FileTableDefaultCursor2


    [Report: ProvideFilePath2]

    Use : ProvidePath

    Local : Line : ProvidePath : Delete : Fields
    Local : Line : ProvidePath : Add : Fields : ProvideFilePath, ProvideFilePathInv2, ProvideFilePathFileNameInv2

    [Field: ProvideFilePathInv2]

    Set as : If $$IsFileExists:mad:FilePathName Then $$GetParentDirectory:mad:FilePathName Else @FilePathName
    FilePathName: $$GetFullPath:#ProvideFilePath
    Set Always : Yes
    Modifies : vCurrentPath2
    Invisible : Yes

    [Field: ProvideFilePathFileNameInv2]

    Set as : If $$IsFileExists:mad:FilePathName Then $$GetFileNameFromPath:mad:FilePathName Else ""
    FilePathName: $$GetFullPath:#ProvideFilePath
    Set Always : Yes
    Modifies : vCurrentFile2
    Invisible : Yes


    [Collection: Select File Drives2]

    Title : $$LocaleString:"File Selection"
    Object : SelectDrives2, ShowMoreLess
    Client Only : Yes
    Filter : IsActiveObj2

    [Object: SelectDrives2]

    Use : Action Object
    Name : If @@IsCurrPathRoot2 Then "" Else $$SysName:Drives
    IsActive : Yes

    Action : Set Root : Set : vCurrentPath2 : @@RootName
    Action : Set Root : Change Table : $$CurrentTable : No : @@TableDefaultCursor ;Folder Selection Table, Provide Path : No : @@TableDefaultCursor

    Action : Set File Root : Set : vCurrentPath2 : @@RootName
    Action : Set File Root : Change Table : $$CurrentTable : No : @@FileTableDefaultCursor2














    ;;;invoice ;;;;;;;;;;;
    [#Form : PrintSimpleFrmtWithLogo]

    Delete : Part : EXPSMP LogoAndCompanyAddress
    Add : Part :After: EXPSMPCompName:EXPSMP2 LogoAndCompanyAddress
    [!Part: EXPSMP2 LogoAndCompanyAddress]

    Part : EXPSMP Image, EXPSMP CompanyMailingAddress,EXPSMP Image2
    Local : Part : Empty : Width : 25% Page

    [Part: EXPSMP Image2]

    Part : EXPSMP Logo2, Empty
    Vertical : Yes
    Invisible : (##SvPreprinted OR NOT ($IsLogoEnabled:Company:##SVCurrentCompany AND ($IsSales OR $IsDebitNote OR $IsCreditNote OR $IsDelNote OR $IsReceipt OR $IsPurcOrder OR $IsSalesOrder OR $IsOutSourceOrder OR $IsJobWorkOrder OR $IsMaterialIn OR $IsMaterialOut)))



    [Part: EXPSMP Logo2]

    Lines : EXPSMP Logo
    Graph Type ##SALogoPath2;$LogoPath2:Company:##SVCurrentCompany

    Height : If ((NOT $$InPrintMode) AND ($$InExportAction OR $$InMailAction)) Then 12% Else 8% Page
    Width : 15% Page
     

    Attached Files:

    Last edited: May 11, 2021


  2. abhinand vk

    abhinand vk Active Member


    sir can you please hel p me on this
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You have missed out DUPLICATING --- [Field: SALogoFilePopUp2]

    Also missed out....System : Formula --- SALogoPath2 : $$GetFileFullPath:(#SALogoPathPopUp2 + "\" + #SALogoFilePopUp2)

    Please check your code again.
     


  4. abhinand vk

    abhinand vk Active Member


    sir i changed this to above your meathead but

    when i change second image path that was also changing path 1
    [#Collection: Global Company Details]


    Add:Object :After : Company ImagePath:Company ImagePath2



    [#Collection: Company Logo Path]

    Use : OutputConfig Formatting
    ADD:Object : Cfg ShowImagePath2

    [Object: Cfg ShowImagePath2]

    Use : Output Configuration
    Name : @@ImagePath2
    Value : ##SALogoPath2
    IsActive : ##SACompLogo
    IsInvisible : (NOT @@IsCmpLogoEnabled)
    IsDependent : NOT ##SACompLogo

    Action : ConfigAction : Do If : ##SACompLogo : Modify Variables : Cfg ShowCompanyLogo

    [Object: Company ImagePath2]

    Use : Output Configuration

    Name : @@ImagePath2
    Value : $LogoPath2:Company:$$CurrentSimpleCompany
    IsDependent : NOT @@IsCMPLogoEnabled
    IsChild : Yes
    IsActive : @@IsCMPLogoEnabled

    Action : Config Action : Do If : (@@IsCMPLogoEnabled AND $$SelectedCmps = 1) : Alter : Company Logo path
    Action : Config Action : Do If : (@@IsCMPLogoEnabled AND $$SelectedCmps > 1) : Alter Collection : Company Alter Logo
    IsInvisible : $$SelectedCmps = 0

    [#Report: Company Logo path]

    Variable: vCurrentPath2
    Set : SubFormTitle : @@CompanyDetails
    Set : vCurrentPath2 : If $$IsFileExists:$LogoPath2 Then $$GetParentDirectory:$LogoPath2 Else $$GetFileFullPath:"."
    Set : vCurrentFile2 : If $$IsFileExists:$LogoPath2 Then $$GetFileNameFromPath:$LogoPath2 Else ""
    Local : Collection : File Selection Table2 : Add : Advanced : @@NonImgFiles2
    [#Report: Cfg ShowCompanyLogo]

    Use : OutputConfig Form
    Variable: vCurrentPath2
    Set : SubFormTitle : @@CompanyDetails
    Set : vCurrentPath2 : If $$IsFileExists:##SALogoPath2 Then $$GetParentDirectory:##SALogoPath2 Else $$GetParentDirectory:mad:@CmpLogoPath2
    Set : vCurrentFile2 : If $$IsFileExists:##SALogoPath2 Then $$GetFileNameFromPath:##SALogoPath2 Else $$GetFileNameFromPath:mad:@CmpLogoPath2
    Local : Collection : File Selection Table2 : Add : Advanced : @@NonImgFiles2


    [Variable: vCurrentPath2]

    Type : String

    [Variable: SALogoPath2]

    Type : String
    Persistent : Yes

    [Variable: vCurrentFile2]

    Type : String

    [System:Variable]
    vCurrentFile2:""
    vCurrentPath2:""
    SALogoPath2:$Logopath2:Company:##SvCurrentCompany
    [System:Formula]
    CmpLogoPath2 : $LogoPath2:Company:$$CurrentSimpleCompany
    ImagePath2 : $$LocaleString:"Second Image Path"
    ImageFileName2 : $$LocaleString:"Second Image File Name"
    IsCurrPathRoot2 : ($$IsSysNameEqual:Root:##vCurrentPath2)
    SALogoPath2 : $$GetFileFullPath:(#SALogoPathPopUp2 + "\" + #SALogoFilePopUp2)
    SALogoPathExist2 : If $$IsEmpty:mad:@SALogoPath2 then $$LocaleString:"Logo path cannot be empty." +
    Else If NOT $$IsFileExists:mad:@SALogoPath2 Then $$LocaleString:"Logo path specified is invalid or file not found." +
    Else If $$FileSize:mad:@SALogoPath2 > 1048577 Then "File size exceeds 1 MB." +
    Else $$LocaleString:"Format Not Supported"

    NonImgFiles2 : (If ##ShowMore OR $IsDirectory OR @@IsSysNameUp Then $IsHidden Else +
    If NOT $$IsEmpty:##vCurrentFile2 AND ##vCurrentFile2 = $Name Then No Else ($FileExtension NOT IN ("bmp", "jpg", "jpeg") OR $IsHidden))
    IsActiveObj2 : $IsActive AND NOT @@IsCurrPathRoot2
    PathDependencyFilter2 : ##vCurrentPath2 != ""
    FileTableDefaultCursor2 : If $$NumItems:FileSelectionTableForCount2 = 1 Then @@IsSysNameUp Else @@TableDefaultCursor
    CfgLogoPath2 : $$GetFileFullPath:(#SALogoPathPopUp2 + "\" + #SALogoPath2)

    SpecifyPathSlash2 : @FullPathName2 = "\\" OR @FullPathName2 contains "\\\"
    [Collection: File Selection Table For Count2]
    Use : File Selection Table2
    [#Part: Company Logo path]

    Add:Line:After: CMP LogoAbsolutePath : Cfg LocationOfLogo2, CMP LogoFileName2,CMP LogoAbsolutePath2
    Local : Field : Medium Prompt : Width : @@LongWidth

    [#Part: Cfg ShowCompanyLogo]



    Add:Line:After:Cfg LogoFileName : Cfg LocationOfLogo2, Cfg LogoFileName2
    Local : Field : Medium Prompt : Width : @@LongWidth
    [Line: Cfg LocationOfLogo2]

    Fields : Medium Prompt, SALogoPathPopUp2
    Local : Field : Medium Prompt : Set as : @@ImagePath2
    Local : Field : Medium Prompt : Inactive : NOT #SACompLogo
    [Field: SALogoPathPopUp2]

    Use : Name Field
    Width : @@NarrWidth
    Set as : If @@IsCurrPathRoot2 Then "" Else ##vCurrentPath2
    Inactive : NOT #SACompLogo
    Skip : Yes
    [Line: CMP LogoFileName2]

    Field : Medium Prompt, SALogoFilePopUp2
    Local : Field: Medium Prompt : Set as : @@ImageFileName2
    Local : Field: Medium Prompt : Inactive : NOT #SACompLogo
    Space Bottom : 0.25


    [Field: SALogoFilePopUp2]

    Use : File Selection Template2
    Width : @@NarrWidth
    Inactive : NOT #SACompLogo

    Control : SALogoPathExist2 : ($$IsEmpty:mad:@SALogoPath2 OR Not $$IsFileExists:mad:@SALogoPath2 OR ($$FileSize:mad:@SALogoPath2 > 1048577))

    Act on Table Element: (@ShowMore OR @ShowLess) : Execute Obj Actions : ShowMoreLess

    ShowMore : ($$IsSysNameEqual:ShowMore:($$CurrentTableObj:$Name))
    ShowLess : ($$IsSysNameEqual:ShowLess:($$CurrentTableObj:$Name))
    Default Table Item:Yes
    Common Table:No
    [Line: CMP LogoAbsolutePath2]

    Field : CMP LogoAbsolutePath2

    [Field: CMP LogoAbsolutePath2]

    Use : Name Field
    Type : String : Forced
    Storage : LogoPath2
    Set as : @@SALogoPath2
    Set Always : Yes
    Invisible : Yes
    [System:UDF ]
    Logopath2:String:1547

    [Line: Cfg LogoFileName2]

    Field : Medium Prompt, SALogoPath2, Cfg LogoAbsolutePath2
    Local : Field: Medium Prompt : Set as : @@ImageFileName
    Local : Field: Medium Prompt : Inactive : NOT #SACompLogo
    Space Bottom : 0.25

    [Field: SALogoPath2]

    Use : File Selection Template2
    Width : @@NarrWidth
    Inactive : NOT #SACompLogo
    Control : SALogoPathExist2 : ($$IsEmpty:mad:@CfgLogoPath2 OR Not $$IsFileExists:mad:@CfgLogoPath2 OR ($$FileSize:mad:@CfgLogoPath2 > 1048577))
    Act on Table Element: (@ShowMore OR @ShowLess) : Execute Obj Actions : ShowMoreLess

    ShowMore : ($$IsSysNameEqual:ShowMore:($$CurrentTableObj:$Name))
    ShowLess : ($$IsSysNameEqual:ShowLess:($$CurrentTableObj:$Name))
    [Field: Cfg LogoAbsolutePath2]

    Use : Name Field
    Type : String : Forced
    Modifies : SALogoPath2
    Set as : @@CfgLogoPath2
    Set Always : Yes
    Invisible : Yes
    [Field: File Selection Template2]

    Use : Name Field
    Set Always : Yes
    Width : @@LongWidth
    Delete : Case
    Show Table : Always
    Set as : ##vCurrentFile2

    Table : Current File Folder2, Provide File Path2, SelectFileDrives2

    Process Change Table: No

    Act on Table Element: @IsDirectory : Execute Obj Actions : Set File Directory

    Act on Table Element: @IsUp : Execute Obj Actions : Set File Parent Directory

    Act on Table Element: @IsRootSelected : Execute Obj Actions : Set File Root

    Act on Table Element: @SpecifyPath : Execute Obj Actions : Set Path

    Act on BackSpace : @@IsSysNameUp : Set File Parent Directory

    Default Table Item : @@FileTableDefaultCursor2

    IsDirectory : $$CurrentTableObj:$IsDirectory AND NOT @IsUp
    IsUp : $$CurrentTableObj:mad:@IsSysNameUp

    IsRootSelected : ($$IsSysNameEqual:Drives:($$CurrentTableObj:$Name))
    SpecifyPath : ($$IsSysNameEqual:providePath:($$CurrentTableObj:$Name))

    [Collection: Current File Folder2]

    Use : Current Path Details2

    Title : $$LocaleString:"File Selection"
    Object : Current File Path2
    Client Only : Yes
    Format : $Name, 35
    Table Sort : @@FileFolderFormat
    Advanced : $IsHidden

    ;;When vCurrentPath is set this collection needs to be regenerated. Setting dependency with Filter
    Filter : PathDependencyFilter2
    ;select * from CurrentFileFolder2
    Explode : File Selection Table2

    [Collection: File Selection Table2]

    Use : Current Path Explode Details2

    Title : $$LocaleString:"File Selection"

    Data Source : File Selection List : ##vDataFolderPath2

    Format : $Name, 35
    Format : @@FileFolderFormat, 15
    Client Only : Yes

    Filter : NotSystemFolders

    [Collection: Current Path Explode Details2]

    Parm Var : vDataFolderPath2 : String : $$TableExplodeOwner:##vDataPath2
    Allow Noise Chars : Yes
    [Collection: Current Path Details2]

    Parm Var : vDataPath2 : String : If $$IsEmpty:##vCurrentPath2 Then @@RootName Else ##vCurrentPath2

    Allow Noise Chars : Yes

    [Object: Current File Path2]

    Behave As : Label
    Name : If @@IsCurrPathRoot2 Then $$SysName:primary Else ##vCurrentPath2
    Full Width : Yes

    [Collection: Provide File Path2]

    Title : $$LocaleString:"File Selection"
    Object : Provide File Path2
    Client Only : Yes


    [Object: Provide File Path2]

    Use : On The Fly Object
    Name : $$SysName:providePath2
    IsActive : Yes

    Action : Set Path : Set : On The Fly Path2 : $$GetOnTheFlyString
    Action : Set Path : Set : On The Fly Path2 : If $$IsEmpty:##OnTheFlyPath2 Then "" Else $$GetFullPath:##OnTheFlyPath2

    Action : Set Path : Do If : ($$IsDirectory:##OnTheFlyPath2) : Set : vCurrentPath2 : ##OnTheFlyPath2

    Action : Set Path : Do If : ((NOT $$IsDirectory:##OnTheFlyPath AND NOT $$IsFileExists:##OnTheFlyPath) OR $$IsEmpty:##OnTheFlyPath2) : Alter : ProvideFilePath2
    Action : Set Path : Do If : ($$IsFileExists:##OnTheFlyPath2) : Set : vCurrentPath2 : $$GetParentDirectory:##OnTheFlyPath2
    Action : Set Path : Do If : ($$IsFileExists:##OnTheFlyPath2) : Set : vCurrentFile2 : $$GetFileNameFromPath:##OnTheFlyPath2
    Action : Set Path : Do If : ($$IsFileExists:##OnTheFlyPath2) : ProcessOnTheFlyinFileSelection:##vCurrentFile2

    Action : Set Path : Do If : (NOT $$IsFileExists:##OnTheFlyPath2 AND (NOT $$IsEmpty:##vCurrentPath2 AND NOT @@IsCurrPathRoot2)) : Change Table : $$CurrentTable : No : @@FileTableDefaultCursor2

    [Variable: OnTheFLyPath2]

    Type : String

    [System:Variable]
    OnTheFLyPath2:""
    [Report: ProvideFilePath2]

    Use : ProvidePath

    Local : Line : ProvidePath : Delete : Fields
    Local : Line : ProvidePath : Add : Fields : ProvideFilePath2, ProvideFilePathInv2, ProvideFilePathFileNameInv2

    [Field: ProvideFilePathInv2]

    Set as : If $$IsFileExists:mad:FilePathName2 Then $$GetParentDirectory:mad:FilePathName2 Else @FilePathName2
    FilePathName2: $$GetFullPath:#ProvideFilePath2
    Set Always : Yes
    Modifies : vCurrentPath2
    Invisible : Yes

    [Field: ProvideFilePathFileNameInv2]

    Set as : If $$IsFileExists:mad:FilePathName2 Then $$GetFileNameFromPath:mad:FilePathName2 Else ""
    FilePathName2: $$GetFullPath:#ProvideFilePath2
    Set Always : Yes
    Modifies : vCurrentFile2
    Invisible : Yes
    [Field: ProvideFilePath2]

    Use : ProvidePath2
    Delete : Control
    Delete : Validate
    Add : Control : IncorrectPathMsg : $$IsEmpty:mad:FullPathName OR (NOT $$IsFileExists:mad:FullPathName AND NOT $$IsDirectory:mad:FullPathName)

    [Field: ProvidePath2]

    Style : Normal Bold
    Case : Title Case
    Set as : ##OnTheFlyPath2
    Modifies : On the Fly Path2
    Max : @@MaxNarrWidth
    Width : 35
    FullPathName2: $$GetFullPath:$$Value
    Validate : If NOT ($$IsEmpty:mad:FullPathName2 OR $$IsFileExists:mad:FullPathName2 OR NOT $$ValidatePath:mad:FullPathName2 OR @@SpecifyPathSlash) Then If NOT $$IsNetworkPath:mad:FullPathName2 AND NOT $$IsDirectory:mad:FullPathName2 Then $$CreateFolderinProvidePath:mad:FullPathName Else Yes Else Yes
    Control : IncorrectPathMsg : $$IsEmpty:mad:FullPathName2 OR $$IsFileExists:mad:FullPathName2 OR NOT $$ValidatePath:mad:FullPathName2 OR @@SpecifyPathSlash2

    [Collection: Select File Drives2]

    Title : $$LocaleString:"File Selection"
    Object : SelectDrives2, ShowMoreLess
    Client Only : Yes
    Filter : IsActiveObj2

    [Object: SelectDrives2]

    Use : Action Object
    Name : If @@IsCurrPathRoot2 Then "" Else $$SysName:Drives
    IsActive : Yes

    Action : Set Root : Set : vCurrentPath2 : @@RootName
    Action : Set Root : Change Table : $$CurrentTable : No : @@TableDefaultCursor ;Folder Selection Table, Provide Path : No : @@TableDefaultCursor

    Action : Set File Root : Set : vCurrentPath2 : @@RootName
    Action : Set File Root : Change Table : $$CurrentTable : No : @@FileTableDefaultCursor2














    ;;;invoice ;;;;;;;;;;;
    [#Form : PrintSimpleFrmtWithLogo]

    Delete : Part : EXPSMP LogoAndCompanyAddress
    Add : Part :After: EXPSMPCompName:EXPSMP2 LogoAndCompanyAddress
    [!Part: EXPSMP2 LogoAndCompanyAddress]

    Part : EXPSMP Image, EXPSMP CompanyMailingAddress,EXPSMP Image2
    Local : Part : Empty : Width : 25% Page

    [Part: EXPSMP Image2]

    Part : EXPSMP Logo2, Empty
    Vertical : Yes
    Invisible : (##SvPreprinted OR NOT ($IsLogoEnabled:Company:##SVCurrentCompany AND ($IsSales OR $IsDebitNote OR $IsCreditNote OR $IsDelNote OR $IsReceipt OR $IsPurcOrder OR $IsSalesOrder OR $IsOutSourceOrder OR $IsJobWorkOrder OR $IsMaterialIn OR $IsMaterialOut)))



    [Part: EXPSMP Logo2]

    Lines : EXPSMP Logo
    Graph Type :mad:@CmpLogoPath2;$LogoPath:Company:##SVCurrentCompany

    Height : If ((NOT $$InPrintMode) AND ($$InExportAction OR $$InMailAction)) Then 12% Else 8% Page
    Width : 15% Page
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You have duplicated existing code, so it should work 100%....if not...then there is some cross references.

    e.g.
    [Field: SALogoFilePopUp2]
    Use : File Selection Template2
    Width : @@NarrWidth
    Inactive : NOT #SACompLogo
    Control : SALogoPathExist2 : ($$IsEmpty:mad:@SALogoPath2 OR Not $$IsFileExists:mad:@SALogoPath2 OR ($$FileSize:mad:@SALogoPath2 > 1048577))
    Act on Table Element: (@ShowMore OR @ShowLess) : Execute Obj Actions : ShowMoreLess
    ShowMore : ($$IsSysNameEqual:ShowMore:($$CurrentTableObj:$Name))
    ShowLess : ($$IsSysNameEqual:ShowLess:($$CurrentTableObj:$Name))
    Default Table Item:Yes
    Common Table:No

    Above red highlight is from original code and you have set same Field reference in new code........ likewise, go through with a fine tooth comb and find out, where the CROSS Reference is happening.
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Also........
    SALogoPathExist2 : If $$IsEmpty:mad:@SALogoPath2 then $$LocaleString:"Logo path cannot be empty." +
    Else If NOT $$IsFileExists:mad:@SALogoPath2 Then $$LocaleString:"Logo path specified is invalid or file not found." +
    Else If $$FileSize:mad:@SALogoPath2 > 1048577 Then "File size exceeds 1 MB." +
    Else $$LocaleString:"Format Not Supported"

    Should NOT @@SALogoPath2 .......be as ##SALogoPath2 as you have defined this as a variable.
     


  7. abhinand vk

    abhinand vk Active Member


    thank you sir

    that problem solved


    problem was in Execute Obj Actions

    [Field: File Selection Template2]

    Use : Name Field
    Set Always : Yes
    Width : @@LongWidth
    Delete : Case
    Show Table : Always
    Set as : ##vCurrentFile2

    Table : Current File Folder2, Provide File Path2, SelectFileDrives2

    Process Change Table: Yes

    Act on Table Element: @IsDirectory2 : Execute Obj Actions : Set File Directory2

    Act on Table Element: @IsUp2 : Execute Obj Actions : Set File Parent Directory2

    Act on Table Element: @IsRootSelected2 : Execute Obj Actions : Set File Root2

    Act on Table Element: @SpecifyPath2 : Execute Obj Actions : Set Path2

    Act on BackSpace : @@IsSysNameUp : Set File Parent Directory2

    Default Table Item : @@FileTableDefaultCursor2

    IsDirectory2 : $$CurrentTableObj:$IsDirectory AND NOT @IsUp2
    IsUp2 : $$CurrentTableObj:mad:@IsSysNameUp

    IsRootSelected2 : ($$IsSysNameEqual:Drives:($$CurrentTableObj:$Name))
    SpecifyPath2 : ($$IsSysNameEqual:providePath:($$CurrentTableObj:$Name))
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Very good... a good lesson learned. :cool::cool:
     


  9. RAJESH KUMAR SABLOK

    RAJESH KUMAR SABLOK New Member


    Hello sir,
    I tried with above modification
    not working, still the same problem.
     


  10. RAJESH KUMAR SABLOK

    RAJESH KUMAR SABLOK New Member


    please try with this
     

    Attached Files:



  11. RAJESH KUMAR SABLOK

    RAJESH KUMAR SABLOK New Member


    It is working fine with company logo "Yes" in default Simple Invoice, If company logo No and Signature Logo Yes then signature logo alone is not getting printed.
    In customized Invoice it is working fine. Please check.
     


Share This Page