Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New report design for TIP
Message
From
18/09/2008 07:21:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/09/2008 16:24:00
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01348397
Message ID:
01348489
Views:
15
>I have 2 related tables projects and funding that work together in a 1 to many relationship. The funding records contain fields for amount, source, and year. I want to create a report where each project and its funding is displayed together. The project data would be displayed in the first column or block, followed by a column for each year. Something like this:
>
>------------------------------------------------------------------------------------------------------
>project1 name|year1amount1|year2amount1|year3amount1
>desc |year1amount2|year2amount2|year3amount2
>etc |year1amount3|year2amount3|year3amount3
>------------------------------------------------------------------------------------------------------
>------------------------------------------------------------------------------------------------------
>project2 name|year1amount1|year2amount1|year3amount1
>desc |year1amount2|year2amount2|year3amount2
>etc |year1amount3|year2amount3|year3amount3
>------------------------------------------------------------------------------------------------------
>
>How would you suggest I construct the cursor(s) and report to accomplish this?
>
>Thanks

Probably I would:
a) Create a cursor which have all those 3 lines as a single record. ie:

project2 name,, desc, etc,year1, year2, year3, y1amount1, .. y3amount3, y1amount2, .. y3amount2, y1amount3, .. y3amount3

b) Create a dummy cursor with a single dummy field with records as much as project count and use 3 arrays for the 3 detail lines.
dummy L
arrProject
arrDesc
arrEtc

c) Create a cursor like:
PropertyName. Year, Amount
and get data onto via UDF.


Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform