Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to generate a report?
Message
 
À
09/01/2002 18:16:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00602753
Message ID:
00602988
Vues:
19
Noah;

Whats the best way to do this”?

Well, the “best way” I believe is to meet user needs. There are many ways to accomplish what you want. I will offer one suggestion, based upon what my users like.
1.  A stand-alone application with two forms.
  A. Form One 
	1. Two list boxes.
		A.  Report Title
		B.  Report Detail
	2.  Two command buttons
		A.  Cancel
		B.  Run Report (Takes you to Form Two).
	3.  Behavior:
		A.  Click on a Report Title and the Report Description is given.
		B.  Double Click on Report Title to launch Form Two.  
  B.  Form Two
	1.  Option Buttons
		A.  Allow user to select Output destination of data set.
                  1.  Create according to user needs and can include but not limited to:
	            A.  Screen (preview)
	            B.  Printer
	            C.  File
		  2.  Grid
			A.  Allows user to see data on Form Two
		  3.  Text boxes and combo boxes as required.
                        A.  Allow user to enter information for data search.
		  4.  Command Buttons
			A.  Search (run SQL querry)
			B.  Reset
			C.  Run Report
			D.  Cancel
		  5.  Behavior
                        A.  User can enter things like date ranges, or any other data to define a specific data set.
                        B.  If desired, no entry will pull all data or you can limit the data set by requiring a
 user input (like date range).  This is based upon system and user requirements.
The above objects comprise a class library I have developed and it has many versions. To modify it requires little work. You create the forms based upon your requirements and the objects that exist or add new objects. Typically, I just have to drop the required text boxes and combo boxes on a form, create a SQL statement in a method and I am in business. Oh yes, a report has to be created – a “minor point”.


The basic concept is to have a uniform report application that can be used standalone or as part of an application. This is table driven so you can make additions very quickly. You could add what ever you need to this without destroying your previous work.

You can have many versions of Form Two if you wish, again based upon needs. Form One is just used to launch the second form and the second form emulates specific needs.

No one who uses any version of FoxPro or Visual FoxPro learned overnight. Learning how to use any software development tool takes time. You can learn a lot by asking questions. One of the best ways to learn is to have a client/customer need either real or perceived. Then go about resolving that need. You will find many ways to accomplish your task and become comfortable with specific approaches and methodologies.

If I can be of any further assistance to you in this matter let me know.

Tom



>Hello,
>
>I'm rather new to foxpro, although i've done quite a bit of database development in the past using oracle, sql server, and informix. I'm finding vfp to be quite a bit different, and honestly a bit frustrating. I'm trying to just run a query and generate a report. After fooling with this for several days, sqlplus doesn't seem so bad!
>
>So, I finally managed to come up with .qpr file that does what I want, in terms of generating the right rows and columns. Now, I want to have this dumped into a report, although just being able to get it into excel would be totally acceptable, maybe even preferable. The trick is that the management folks should be able to do this on their own once i'm done. With Oracle, i've shown folks how to open excel, and use an odbc data source to run a query and grab the data they need. Is there some way to do this with vfp? That would be ideal, I think. I was thinking I could write some sort of class or procedure that you could double click on that would open the table, run the query, and dump the results into a report, but the mechanics of that so far are beyong my expertise. The documentation on all of this always seems to assume that you are writing some sort of monolithic app and you want to add a report to it. I just want some data; Whats the best way to do this?
>
>thanks very much for any input you might have
>noah
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform