Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting data to metric
Message
De
19/11/2004 17:23:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
19/11/2004 08:37:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
00962835
Message ID:
00963096
Vues:
8
>As long as the data gets exported to an excel file, the customer doesnt care.
>
>I'm not sure what you mean by a view on a report. How would you take a view of the displayed report values.
>
>My field expression looks like this in the report; round(AHD*25.4,2) so only the displayed value is in metric.

Oh I understood customer wanted to dýrectly access to table výa some connectýon lýke OleDb. If that was the case you'd simply create a view of that table where you set your fields to expressions. ie:
create sql view myMetricView as ;
 select round(AHD*25.4,2) as AHD, round(otherField*25.4,2) as otherField ... ;
 from myTable 
Now your case is simplier. You don't even need the view just the sql.
 select round(AHD*25.4,2) as AHD, round(otherField*25.4,2) as otherField ... ;
 from myTable ;
 into cursor crsExport
 copy to myExcelExport type CSV
Alternatively still view (or just the SQL) might be of value if you'd create an excel file that refreshes data from live VFP table. To do that you'd create an excel file that adds a query table (QueryTablesAdd).

PS: For QueryTablesAdd sample check Thread #949002
There a disconnected recordset is used. However you could modify the code and it has a live connection directly to your database (hence query from table).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform