Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_ASCIICOLS problem
Message
De
23/07/2005 12:52:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01033980
Message ID:
01035388
Vues:
11
Not being able to reliably save the report to a simple text file is a serious shortcoming of VFP. The same problem occurs when you print ASCII to a dot matrix printer.

The way we solved the problem was to keep our reports in FPDOS 2.6 format, which worked for us because our product was migrated from that version. Naturally we have to maintain the reports from FPDOS 2.6 which is cumbersome.

The fact that that keeping reports in FPDOS 2.6 format works shows that one approach to resolving the issue in VFP is to figure out how to convert the report to that format on the fly, just before printing. I tried but was not able to quite get it. If someone can do it that would be a useful program to place here.

Another way may be with a report listener in VFP9. Has anyone done that?

Alex



>Hi Gurus....
>
>Todays problem is this...............
>
>I have some Reports I want to not only output to the Printer and Display, but also to a Text File.
>
>The code uses this..................
>
>
>Do Case
>		Case mdisprt = "D"
>			Report Form (lcFile) To Printer Prompt Preview &lcExtra
>		Case mdisprt = "P"
>			Report Form (lcFile) To Print Prompt Noconsole &lcExtra
>		Case mdisprt = "F"
>			Local lcOut
>			lcOut  = Putfile()
>			If Not Empty(lcOut)
>				Report Form (lcFile) To File (lcOut) Ascii &lcExtra
>			Endif
>	Endcase
>
>
>Printer and Display output great!
>
>BUT...................
>
>The File output is all scrunched up!!! Columns of data are cut off so that each row will fit in under 80 columns in the text file output.
>
>Searching the help gives this.... the output for the text file is contolled by
>_ASCIICOLS = somenumber.... where the default is 80.
>
>The help says I can change this value and put it in the config.fpw file.
>
>I tried that, but it didn't seem to have any effect (I set the output to 160 columns).
>
>I even placed the _ASCIICOLS value on the report, so I could see its value.
>
>Here is the config.fpw
>
>
>MVCOUNT=3600
>TITLE="Loading Horizon Application..."
>SCREEN=OFF
>STATUSBAR=OFF
>TABLEVALIDATE=0
>REPROCESS=30
>_ASCIICOLS=160
>
>
>And I made sure that the program used this config.fpw file on startup.
>
>OK Gurus.... any ideas? Thanks!
>
>Tommy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform