Can you paste the full context? Usual suspects would be using an invalid option constant or querying a print option without actually printing. A full log should help to troubleshoot the issue.
INFO CXLL31 LL.API 4CD4 18.02.2026 06:40:42.932 >LlPrintGetOptionString(1,18==<internal>,0000000005E102F4,1024) 27743 6
INFO CXLL31 LL.API 4CD4 18.02.2026 06:40:42.932 <LlPrintGetOptionString() -> -18 (0xffffffee) (Parameter error. Please use debug mode to determine the error.) 27744 12
INFO CXLL31 LL.API 4CD4 18.02.2026 06:40:42.932 >LlPrintSetOptionString(1,17:<internal>,'PRV;HTML') 27745 12
INFO CXLL31 LL.API 4CD4 18.02.2026 06:40:42.932 <LlPrintSetOptionString() -> -18 (0xffffffee) (Parameter error. Please use debug mode to determine the error.) 27746 12
INFO CXLL31 LL.API 4CD4 18.02.2026 06:40:44.219 >LlPrintGetOptionString(1,18==<internal>,0000000005E102F4,1024) 27747 10
INFO CXLL31 LL.API 4CD4 18.02.2026 06:40:44.219 <LlPrintGetOptionString() -> -18 (0xffffffee) (Parameter error. Please use debug mode to determine the error.) 27748 10
looks like it should rather be a call to LlGetOptionString or LlSetOptionString. Then, the constants passed would make more sense as they would resolve to
I was unable to find these calls in our DataFlex sample - are you positive they’re in there? Can you give me the full file name of the source file in this case?
tldr: change the call to use LlSetOptionString and LlGetOptionString and move the calls before LlPrint(WithBox)Start. That should help.
If (iDest=LL_PRINT_EXPORT) Begin
//LlSetOptionString(hJob, LL_OPTIONSTR_EXPORTS_ALLOWED,"PRV;HTML");
String sDummy_1
String sDummy_2
Get LLPrintGetOptionString of hoLL LL_OPTIONSTR_EXPORTS_ALLOWED to sDummy_1
Get LLPrintSetOptionString of hoLL LL_OPTIONSTR_EXPORTS_AVAILABLE "PRV;HTML" to iRet
Get LLPrintGetOptionString of hoLL LL_OPTIONSTR_EXPORTS_ALLOWED to sDummy_2
This should actually be LlSet... and LlGet... just like in the comment that’s also present. And it needs to be called earlier, here:
// Start the Report
//-> Insert the calls here!
Get LLPrintWithBoxStart of hoLL iProjectType sFile iDest LL_BOXTYPE_EMPTYABORT hWnd "Printing Records" to iRet