hexagon logo

Show File name in Report Header

Hi

Im new in PC-DMIS world Wink (4.3 mr1, winxp:lividSlight smile

I create my personal label(fileheader.lbl) and i want show in program name(only xyz.PRG, not a full path). I dont want use macro or program variable etc... only xyz.lbl

My problem is: look at picture, last row...
The InStr expression dont work...I dontt know, I write something wrong or cant use it. Any idea??

Some test before concatenate full formula:



Sry my english....

Thank you for your help
Parents
  • It seems it can't be done (easily).

    There is a function INDEX(string1, string2) which by the description in the Help is the same as what you expect from INSTR(...) but without the argument giving starting position.

    But what you would really need is the (in this variation of BASIC) non-existing "RINDEX(...)" which could be used to locate the *last* backslash, and then doing a RIGHT(...) using that information.

    ...

    But maybe... look in the help for GETPROGRAMINFO() - maybe the PARTNAME or FILENAME is what you want (I haven't tried it myself, but the existence of PARTPATH makes me guess/hope).
    SORRY - that function probably doesn't exist in version 4.3 :-(


    I find it a major nuisance that PC-DMIS uses TWO DIFFERENT DIALECTS OF BASIC, one for the scripts and another for the reports, none of them complete, and they are not equal. Add to this the functional support of the PC-DMIS language itself, and you must learn THREE different ways of expressing the same kind of operations depending on in what part of PC-DMIS you're working. And I've programmed computers professionally since 1980...
Reply
  • It seems it can't be done (easily).

    There is a function INDEX(string1, string2) which by the description in the Help is the same as what you expect from INSTR(...) but without the argument giving starting position.

    But what you would really need is the (in this variation of BASIC) non-existing "RINDEX(...)" which could be used to locate the *last* backslash, and then doing a RIGHT(...) using that information.

    ...

    But maybe... look in the help for GETPROGRAMINFO() - maybe the PARTNAME or FILENAME is what you want (I haven't tried it myself, but the existence of PARTPATH makes me guess/hope).
    SORRY - that function probably doesn't exist in version 4.3 :-(


    I find it a major nuisance that PC-DMIS uses TWO DIFFERENT DIALECTS OF BASIC, one for the scripts and another for the reports, none of them complete, and they are not equal. Add to this the functional support of the PC-DMIS language itself, and you must learn THREE different ways of expressing the same kind of operations depending on in what part of PC-DMIS you're working. And I've programmed computers professionally since 1980...
Children
No Data