unit U_LabelPrintFun; interface uses Forms, U_LabelPrint, U_ClientPrintRmf; function FormPrint(App: Tapplication; JsonArgs: PChar): PChar; function FunPrint(App: Tapplication; JsonArgs: PChar): PChar; implementation //'{ "LMType": "LMType","PreviewPrint": true,"DConString": "'+DConString+'","DCode": "'+DCode+'","DName": "'+DName+'", "PrtArgs": [ { "IsSql": true, "Filtration": "Filtration1" }] }'; function FormPrint(App: Tapplication; JsonArgs: PChar): PChar; begin with TfrmLabelPrint.Create(App, PChar(JsonArgs)) do begin if ShowModal = 1 then Result := FJsonOut else Result := FJsonOut; end; end; // '{ "LBName": "²âÊÔ","QrCodeField": "ssid","DConString": "'+DConString+'","DCode": "'+DCode+'","DName": "'+DName+'","IsPreview": true,"printerIndex": 0,"ExportFileType": "", "PrtArgs": [ {"SqlStr": "EXEC p_test ''22'' " }] }'; function FunPrint(App: Tapplication; JsonArgs: PChar): PChar; begin with TfrmClientPrintRmf.Create(App, JsonArgs) do begin Show; Result := FJsonOut; end; end; end.