Solved

Foxpro Report Writer

Posted on 2016-10-03
11
16 Views
Last Modified: 2016-11-21
I am back in the Fox Pro world after having been away for  years.  I need to print a report and can not find any documentation on the report writer . Using Fox Version 9

I have a table:
Fields:
Date   Amount   accountname

It is an accounting application.   What  I need is a report subtotaled by each account name and than at the bottom the whole thing totaled.  I would like to show the amounts with in each account to be sorted by date.

Can someone help me to get started.

Thank You
Dan
0
Comment
Question by:Malibucompany
  • 7
  • 4
11 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 250 total points (awarded by participants)
ID: 41827268
Welcome back Dan!

You may start with data preparation:

SELECT accountname, date, amount
  FROM YourTable
 ORDER BY accountname, date
 INTO CURSOR cRepData

Now you may create the report layout. You have a few options:

1) Quick report
Issue command CREATE REPORT MyReport
and from the Report menu select Quick Report which will ask for a few settings and creates the report layout for you. To group results by accountname you have to add Group band into the report. And you have to also add summary or another group which will contains the report total.

2) Report Wizard
From Tools menu select Wizards - Report and design the report in user friendly dialog. This way allows to define data grouping for accountname subtotals.

3) Report designer
Issue command CREATE REPORT MyReport  and add all the fields and groups and totals manually

To print the report issue REPORT FORM command or appropriate menu option. Print button also appears when you preview the report.

More info about FoxPro reports creation:
https://msdn.microsoft.com/en-us/library/ms917483.aspx
more advanced: https://msdn.microsoft.com/en-us/library/ms965281.aspx

FoxPro learning videos:
http://www.garfieldhudson.com/freevideos.aspx

Also books are available, e.g.
https://books.google.cz/books?id=fDrN1uktv70C&pg=PA35&lpg=PA35&dq=FoxPro+reports+basics&source=bl&ots=FNbbibJ2N0&sig=LMmtYadMs0nFCCLZOokaMepnmSs&hl=en&sa=X&redir_esc=y#v=onepage&q=FoxPro%20reports%20basics&f=false
0
 

Assisted Solution

by:Malibucompany
Malibucompany earned 250 total points (awarded by participants)
ID: 41827323
Pcelba
Thank you for the welcome back !
I followed the code. With works till I get to the set order line

order by expensecat, date into cursor crepdata

I get an "Unrecognized Command verb error"

Did I do something wrong?
0
 
LVL 41

Expert Comment

by:pcelba
ID: 41827675
Please post your command and I'll tell.
What I forgot are semicolons for line continuation, so:

SELECT accountname, date, amount ;
  FROM YourTable ;
 ORDER BY accountname, date ;
 INTO CURSOR cRepData

or simply place the command at one line (not recommended for more complex commands but used in Command Window very often).

This is FoxPro speciality as the xBase language started earlier than standard SQL (T-SQL, MySQL, ...) which uses semicolons as the command end mark.
0
 

Author Comment

by:Malibucompany
ID: 41831068
pcelba
Thank You job done. Just curious where does Fox Pro sit in the world today?  Looks like Microsoft has walked away from it.  The younger generations (who never heard of Fox) have told me the thing to do is to learn RUBY  which is open source.  Ruby on the Rails frame work.  Know anything about it??

Thanks again
0
 
LVL 41

Expert Comment

by:pcelba
ID: 41831485
Yes, FoxPro becomes deprecated and Microsoft refused the support already. But FoxPro has strong and compact community so you may find still updated add-ons on e.g. http://vfpx.codeplex.com/ (search for other FoxPro projects at CodePlex).

Also VFP uses Win32 API WIndows subsystem (as many other applications do) so it will work in all future operating systems supporting this API. And we can expect long life for Win32 API because Visual Basic 6 is still supported Microsoft product which uses WInd 32 API...

One Chinese company still offers unofficial VFP 9 patches and VFP compiler (http://www.baiyujia.com/vfpcompiler/en/default.asp).

And Tiobe index shows VFP is between 51 and 100 position among programming languages. Which is not good but it shows FoxPro is not forgotten language.

Tiobe can also help to decide about the future orientation. You know SQL already. To learn Python or Java could also be a good decision.

And you should answer yourself whether to go into some web environment programming (PHP, ASP.NET, C#, HTML, JavaScript etc.).

BTW, Xbase++ and Lianja are possible FoxPro successors.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Malibucompany
ID: 41835900
Do you know anything about Ruby?   That is what many in the U.S. are talking about.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 41836181
No, I did not use Ruby yet. It is known and popular language today but depends on your clients what they are asking for.

My opinion: Java and C# do have better value on the market because they are requested by enterprise customers more often than rarely used languages. Of course, this also depends on the developed application.
0
 

Author Comment

by:Malibucompany
ID: 41836244
Just watched some videos on Ruby from YALE   looks like the IVY schools are really pushing it. Starndard for Undergrad student core requirement.   Perhaps worth learning.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 41836487
Yes, schools are pushing it but more important is the real usage of such language and also your intention. If you just have time to learn something new and you evaluated Ruby as the candidate then do it. If you would like to stay with database applications then you'll need to find new data platform and decide what database engine and what front end tool to select... etc.

C# and SQL Server are candidates No. 1 for me... I am also using Python and languages necessary for web development. And even the web development has several main branches...

Also the target platform is important. Desktop, mobile, web, Windows, IOS, Linux...

FoxPro was one of the leading desktop database platforms but we have too many choices now...

If you are still tied to databases then to know something about main data engines is worth. You may download many of them (MySQL, PortgreSQL, Firebird. MS SQL) for a free. Then you may test how to use them from various languages which are also free. To learn some of the above more deeply will need the real project.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 41856784
The question was answered by the first two comments from pcelba. Then author responded "Thank You job done." but the discussion continued on other topics without question closing.

Lets wait a few days for the author and then we may look back and decide.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 41895614
The question was answered by the first two comments from pcelba. Then author responded "Thank You job done." but the discussion continued on other topics without question closing.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now