Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mutli Line report

Status
Not open for further replies.

AidenMc

Programmer
Sep 19, 2002
58
GB
Hi all ,
I was hoping someone can help me with an issue I am having.
I am trying to create a report to show time ie hours spent in a month, expenses incurred in that month and the income receive in that month also
ie Time
Total time
Expenses
Total expenses
Income
Total income

I have no problem in getting the information from the three tables where I am getting confused is how to colate the information onto a report in the above format.
Does anyone have any ideas

Thanks

Aiden
 
Thanks for This, I should have mention I am using VFP6, we havent moved across to VFP9 yet.....is it possible to this in VFP6
 
Hi Aiden,

It's not that hard. What I would do is create a unified cursor wherein each record would have a section for time, expenses and income. In a "time" record (perhaps identified by a record code) the time data would be present while the expense and income sections would be empty, and etc.

SELECT time
SCAN
INSERT INTO mycursor..... && Fill-in time data
ENDSCAN

SELECT expenses
SCAN
INSERT INTO mycursor..... && Fill-in expense data
ENDSCAN

SELECT income
SCAN
INSERT INTO mycursor..... && Fill-in income data
ENDSCAN

The report would determine which type of record it had, and would print the appropriate fields and headings using "Print when" logic.

Jim
 
Jim,
Thanks for that, I will give it a go, I had been playing around with trying to create a union but I dont know whether it's all the coffee or the lack of sleep but I am getting no where, I think I will give your way a go now, if sucessfull I will keep going, if not I reckon sleep and then try again in the morning, will let you know how I get on

Thanks

Aiden
 
Jim,
Thanks for that, my client now wants me to output this to excel, but with formula etc but i think i will post this under a new thread

Aiden
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top