Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can a Report (FRX) be printed from the web?
Message
De
16/05/2003 14:23:27
 
 
À
16/05/2003 13:27:51
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00789317
Message ID:
00789380
Vues:
26
>>I have a VFP report that prints just fine from a desktop application. Now, I would like to have users print the report from their Internet browser. How would I go about doing this? I aleady have COM DLL written in VFP that I call from many ASP pages to retrieve and update data in our VFP database. Could I simply do a REPORT FORM ... TO FILE in the COM DLL and print the file it creates in the ASP?
>>
>>Thanks in advance for your help!
>>Tim
>
>REPORT FORM ... TO FILE creates a PostScript file that will be useless for output in ASP. REPORT FORM ... TO FILE ASCII may work, but you should be aware that creating an ASCII file from a scx file requires that the report engine use the current printer driver to make decisions about how to break report content into lines and spaces. Results here are usually far from satisfactory.
>
>IMO, best bet here is to create a pdf file and show that to the user to let him print it. Most PDF tools install a virtual printer on the machine creating the file and let you print anything to that printer to create a PDF file.
>
>But there's a pretty big hurdle to overcome with either of the above solutions: unless you're using VFP8, the Print dialog box pops up when printing a report. This is a deal-killer for in-proc dlls, you can't show UI from them, and attempting to do so (even inadvertently) causes an error. VFP 8 allows you to suppress the print UI with the NODIALOG option in the REPORT FORM command. (I have no personal experience with the new fix).
>
>So you can change your COM server to an exe (adjust ASP metabase properties accordingly). Or you can compile using VFP 8, and use the new NODIALOG option.

I think you're still stuck with using an .EXE. The NODIALOG has no impact on a .DLL, and you still can't use a REPORT command in a COM .DLL. :(

PS: Welcome back, even if it's only for a little while.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform