VBFOXDEV35
Programmer
All: This one is an interesting question.
I have an application that is multi-user due to a citrix connection. My problem is some of the reports require PDF writer to create reports. On standard Windows OS's (XP, 2000, 98, etc) I have no problem. But once I get to citrix, all hell breaks loose.
I have 3 functions I use to check to see:
A) what is the current OS
b) To get the PDF Profile string
c) and to set it in code for later use.
here are the functions
FUNCTION NTKernel
Declare Long GetVersion in WIN32API
RETURN (GetVersion() > 0)
***********************************************************FUNCTION PDFIni
Declare Long GetVersion in WIN32API
LOCAL strReturn
IF NTKernel() THEN
DO CASE
* This case added in becasue of the citrix server
CASE FILE("M:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\PDFDD.dll"
strReturn = "M:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\__pdf.ini"
** these below are for any Windows XXXX OS
CASE FILE("C:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\PDFDD.dll"
strReturn = "C:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\__pdf.ini"
CASE FILE("C:\WINDOWS\SYSTEM32\SPOOL\DRIVERS\W32x86\2\PDFDD.dll"
strReturn = "C:\WINDOWS\SYSTEM32\SPOOL\DRIVERS\W32x86\2\__pdf.ini"
ENDCASE
ELSE
strReturn = "C:\WINDOWS\SYSTEM\PDFWRITR.INI"
ENDIF
RETURN (strReturn)
***********************************************************
FUNCTION GetPDFFile
LOCAL RTVL, strPDFFileName,strINITemp
Declare Long GetPrivateProfileStringA in WIN32API String lpSection, String lpSetting, ;
String lpDefault, String @ lpReturnedString, Long nSize, String lpFileName
strPDFFileName = SPACE(255)
strINITemp = IIF(NTKernel(),PDFIni(),"C:\WINDOWS\WIN.INI"
rtvl = GetPrivateProfileStringA("Acrobat PDFWriter", "PDFFileName", "", @strPDFFileName, ;
255, StrINITemp)
IF RTVL > 0 .AND. !EMPTY(strPDFFileName)
IF CHR(0) $ strPDFFileName
strPDFFileName = LEFT(strPDFFileName, AT(CHR(0), strPDFFileName)-1)
ENDIF
ENDIF
IF CHR(0) $ strPDFFileName
strPDFFileName = LEFT(strPDFFileName, AT(CHR(0), strPDFFileName)-1)
ENDIF
Clear DLLs
RETURN strPDFFileName
***********************************************************
FUNCTION SetPDFFile
LPARAMETERS strPDFFile
Declare Long WritePrivateProfileStringA in WIN32API AS SetPrivateProfileString ;
String lpSection, String lpSetting, String lpValue, String lpFileName
rtvl = SetPrivateProfileString("Acrobat PDFWriter", "PDFFileName", strPDFFile, ;
PDFIni())
Clear DLLs
RETURN RTVL
Any ideas on how to get each citrix user the ability to create their own reports and not butt heads with anything else?
Thanks all for any thoughts.
Art
Art DeGaetano II
Software Developer, MOUS
I have an application that is multi-user due to a citrix connection. My problem is some of the reports require PDF writer to create reports. On standard Windows OS's (XP, 2000, 98, etc) I have no problem. But once I get to citrix, all hell breaks loose.
I have 3 functions I use to check to see:
A) what is the current OS
b) To get the PDF Profile string
c) and to set it in code for later use.
here are the functions
FUNCTION NTKernel
Declare Long GetVersion in WIN32API
RETURN (GetVersion() > 0)
***********************************************************FUNCTION PDFIni
Declare Long GetVersion in WIN32API
LOCAL strReturn
IF NTKernel() THEN
DO CASE
* This case added in becasue of the citrix server
CASE FILE("M:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\PDFDD.dll"
strReturn = "M:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\__pdf.ini"
** these below are for any Windows XXXX OS
CASE FILE("C:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\PDFDD.dll"
strReturn = "C:\WINNT\SYSTEM32\SPOOL\DRIVERS\W32x86\2\__pdf.ini"
CASE FILE("C:\WINDOWS\SYSTEM32\SPOOL\DRIVERS\W32x86\2\PDFDD.dll"
strReturn = "C:\WINDOWS\SYSTEM32\SPOOL\DRIVERS\W32x86\2\__pdf.ini"
ENDCASE
ELSE
strReturn = "C:\WINDOWS\SYSTEM\PDFWRITR.INI"
ENDIF
RETURN (strReturn)
***********************************************************
FUNCTION GetPDFFile
LOCAL RTVL, strPDFFileName,strINITemp
Declare Long GetPrivateProfileStringA in WIN32API String lpSection, String lpSetting, ;
String lpDefault, String @ lpReturnedString, Long nSize, String lpFileName
strPDFFileName = SPACE(255)
strINITemp = IIF(NTKernel(),PDFIni(),"C:\WINDOWS\WIN.INI"
rtvl = GetPrivateProfileStringA("Acrobat PDFWriter", "PDFFileName", "", @strPDFFileName, ;
255, StrINITemp)
IF RTVL > 0 .AND. !EMPTY(strPDFFileName)
IF CHR(0) $ strPDFFileName
strPDFFileName = LEFT(strPDFFileName, AT(CHR(0), strPDFFileName)-1)
ENDIF
ENDIF
IF CHR(0) $ strPDFFileName
strPDFFileName = LEFT(strPDFFileName, AT(CHR(0), strPDFFileName)-1)
ENDIF
Clear DLLs
RETURN strPDFFileName
***********************************************************
FUNCTION SetPDFFile
LPARAMETERS strPDFFile
Declare Long WritePrivateProfileStringA in WIN32API AS SetPrivateProfileString ;
String lpSection, String lpSetting, String lpValue, String lpFileName
rtvl = SetPrivateProfileString("Acrobat PDFWriter", "PDFFileName", strPDFFile, ;
PDFIni())
Clear DLLs
RETURN RTVL
Any ideas on how to get each citrix user the ability to create their own reports and not butt heads with anything else?
Thanks all for any thoughts.
Art
Art DeGaetano II
Software Developer, MOUS