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:
00602948
Vues:
17
I'm confused as to what you are trying to do? Are you doing the SELECT statement from the program that calls the report or are you trying to do it in the Report? At first I thought you were saying you had one large object in the detail band called "exp1", but then you said, "exp1=the SQL SELECT statement" so that threw me.

Can you please clarify how you do the select statement, where you do the select statement and what objects are on the report?

Cathy

>I have a report designed with headings, etc. The report prints result of SQL SELECT statement, but the SELECT statement is dynamic: it changes according to what user sets.
>
>Example:
>SELECT last,first from myTable1 where last='CHAMP'
>
>and another time it would be:
>SELECT last,dob from myTable2 ORDER by last
>etc.
>
>I have it set right now where in the report designer, there is only 1 long row (as can fit in a page) as exp1. Then the program passes exp1 to the report, to have it printed. exp1=the SQL SELECT statement. The problem is, exp1 must be a long character string. I have to convert all the fields to a string which makes the SELECT statement too long & when it gets too long, I get an error message. For example:
>exp1='SELECT last+space(4)+str(idnumber,5) FROM myTable'
>This can be very long & complicated with ORDER BY & WHERE clause, etc.
>
>How can I best print a dynamic SQL SELECT result into a report?
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