* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
*                                                                 *
*    vyplni v reportech defaultni hodnoty definice tiskarny       *
*                                                                 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

adresar = "i:\food600\reports\"

#DEFINE CRLF CHR(13)+CHR(10)
SET SAFETY OFF 
CLEAR 
CLOSE DATABASES 
crea table soubory (nazev c(66), atrib c(1), delka n(9))

pocet = adir(qqq, m.adresar + "*.frx")
for ii = 1 to m.pocet
  if left(qqq(ii, 1), 1) # "."
     insert into soubory (nazev, atrib, delka) ;
        value (lowe(qqq(ii, 1)), iif("D" $ qqq(ii, 5), "D", ""), qqq(ii, 2))
  endif
endfor

SCAN
    SELECT 0
    USE (m.adresar + ALLTRIM(soubory.nazev))
    LOCATE FOR objtype = 1 .and. objcode = 53
    IF FOUND()
       IF LEN(expr) > 40
           ? PADC(" " + ALLTRIM(soubory.nazev) + " ", 44, "-") + STR(LEN(expr)) + CRLF + expr
       ENDIF 
       pom = SUBSTR(expr, AT("ORIENTATION=", expr))
       pom = LEFT(m.pom, AT(CRLF, pom)+1)
*       DO tiskni_pom_po_znacich
       m.pom = m.pom + "PAPERSIZE=9" + CRLF
       m.pom = m.pom + "COLOR=1"     + CRLF
*       m.pom = m.pom + "DUPLEX=1"    + CRLF
       REPLACE expr WITH m.pom, tag WITH "", tag2 WITH ""
    ENDIF
    USE 
    SELECT soubory
ENDSCAN
? PADC("   HOTOVO   ", 77, "=")


* * * * * * * * * * * * * * * * * * * * * * * * * * * * 
PROCEDURE tiskni_pom_po_znacich
FOR ii = 1 TO len(pom)
   xx = SUBSTR(pom, m.ii,1)
   ? ASC(m.xx), IIF(ASC(m.xx) > 32, m.xx, "")
ENDFOR 
