Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing dynamic SELECT statement result with report dsg
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00602769
Message ID:
00603052
Vues:
23
Inge,

What Sergey is referring to is the CREATE REPORT < name > FROM < file > command which creates a brand new report called < name > based on the DBF file called < file >. It adds an object to the report for each field in the DBF file as well as a title for each column. Look in the VFP Help file for more information about how to do this. This would eliminate your need to concatenate all the fields in the select statement into one field and just let you select they individually as follows:
SELECT last, uidno FROM myTable INTO CURSOR xTemp
lcFile = DBF('xTemp')
CREATE REPORT MyReport FROM &lcFile
Hope this helps!
Cathy

>Cathy,
>
>mySQLString='SELECT last+space(4)+str(uidno,4) FROM myTable INTO CURSOR xTemp'
>&mySQLString
>REPORT FORM myReport NOCONSOLE TO PRINTER
>
>mySQLString is dynamic: it changes depending on user selection.
>in myReport, I have an object called exp1 (width=page width). exp1=rows resulting from the SELECT statement.
>
>Sometimes mySQLString really gets very long because I have to convert everything to string & have to concatinate all fields into 1 giant field: exp1. When mySQLString is too long, I get an error as it is executed (&mySQLString). Is threre a way to tell VFP to accept longer string in &mySQLString???
>
>Chris,
>Dumping to excel is not an option. My users will not like that at all.
>
>Sergey,
>I'm not too sure what you are telling me. Dump the SELECT results into a temp. table, then what?
>CREATE REPORT FileName1 FROM (lcTempTable): what does that do? Looks very promising ... Can you elaborate? Can I still have my headings in report FileName1? (heading = mySQLString, so that when the report is printed out, the SQL statement is printed as a heading on the report).
>
>Thank you all!!!!!
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform