if thisForm.wlWeb && APPLICATION RUNS IN WEB MODE (ELSE is desktop mode) && {en} Manual FIC adaptation: report to PDF in Web mode using a PDF generator && {fr} Adaptation manuelle FiC : générer un état PDF avec un générateur lcPDFout = Textmerge([<<Addbs(Sys(2023))>>customer_<<Trim(m.customerID)>>_<<m.lcPDFengine>>.pdf]) && PDF > VFP temp folder try local oXFRXlistener as XFRXlistener of xfrx.app oXFRXlistener = Evaluate("xfrx('XFRX#LISTENER')") success = Vartype(m.oXFRXlistener) == 'O' if m.success result = m.oXFRXlistener.setParams(; && doc: https://eqeuscom.atlassian.net/wiki/display/DOC/Properties+and+methods+common+in+XFRXListener+and+XFRXSession+classes m.lcPDFout; && tcOutputName - name of the document to create. , ; && tcTempDirectory - [optional] directory where temporary files will be created. If blank, the temporary files will be created in the current directory , .T.; && tlNotOpenViewer - [optional] if set to .T., documents won't be opened after the generation , ; && tcCodePage - [optional] codepage of the generated document. If you don't specify this parameter, cpcurrent() is used , .T.; && tlSilent - [optional] if set to .T., no messages will be printed. This option is useful if your application is not in English and/or you would like to handle the Processing... message and error messages in your code. , ; && tlNewSession - [optional] This option is not used for PDF targets. If set to .T., the document will always be open in a new Word session. By default, word document will be open in the current Word session, if exists. , 'PDF'; && tcTarget - The output type to be generated. One of the values listed at XFRX Output Target Types. ) success = Empty(m.result) if m.success * -------------------------------- REPORT FORM customer; for customer_ID = m.customerID; object m.oXFRXlistener * -------------------------------- else result = m.oXFRXlistener.ErrorMessage(m.result) endif else result = [could not instantiate XFRX report listener] endif catch to m.result success = .F. result = cException (m.result) endtry * {en} Now display generated PDF to the User * {fr} Afficher le PDF généré à l'utilisateur thisForm.wForm(; 'reportChild.scx'; , .F.; && modeless , m.lcPDFout; ) && {en} as we no longer use the 'DO FORM' command, && {en} project manager is no longer able to figure out that the 'reportChild.scx' form && {en} should be added/included into the project; this instructions works around this. && {fr} comme nous n'utilisons plus la commande 'DO FORM', && {fr} le gestionnaire de projet n'a plus moyen de savoir que l'écran 'reportChild.scx' && {fr} doit être ajouté/inclus au projet. Cette instruction comble cette lacune. external form reportChild thisForm.wMessageBox(Iif(m.success; , Textmerge(''; + [FoxInCloud generated an order report for customer '<<m.company>>'] + ' '; + [using the '<<m.lcPDFengine>>' PDF generator,] + ' '; + [and displayed it into a ]; + ICase(; thisForm.opgInto.Value = 1,; [child form within the same browser Tab],; thisForm.opgInto.Value = 2,; [new browser Tab],; thisForm.opgInto.Value = 3,; [new browser Window],; []; ) + [, ]; + [all in <<cSeconds(m.nSeconds)>>]; && modify command abDate ); , m.result; )) && {en} at this point, in Web mode, if 'output into a window' was chosen above, && {en} FoxInCloud Application Server displays 2 new windows inside the browser && {fr} ici, en mode Web, si l'utilisateur a choisi la sortie dans une fenêtre, && {fr} Le Serveur d'Application FoxInCloud affiche 2 fenêtres dans le navigateur else && APPLICATION RUNS IN LAN/DESKTOP MODE report form customer for customer_ID = m.customerID preview && {en} runs in a private datasession endif>I am still struggling with the idea to have either a separate code base for Desktop and Web, or to try putting it together in one.