Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count??
Message
From
07/08/2009 04:35:38
 
 
To
07/08/2009 04:05:02
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01416689
Message ID:
01416691
Views:
70
Agnes,

I try to avoid calculated fields in reports as much as I can.

Instead I add them to the cursor

Advantages
- Easier
- The expression is always available. You can eg display the total in the group header, or a % of total in the detail

I would do something like this
	create cursor SchnapsTmp ;
	(	a	c(1), ;
		b	c(1),; 
		c	c(1) ;
	)
	insert into SchnapsTmp values ('', 'x', 'y')
	insert into SchnapsTmp values ('', 'x', 'y')
	insert into SchnapsTmp values ('a', 'x', 'y')
	insert into SchnapsTmp values ('b', 'x', 'y')
	insert into SchnapsTmp values ('c', 'x', 'y')
	
	select * ;
		from SchnapsTmp, ;
			( select count(*) as NumberA from SchnapsTmp where ( a <> '') ) XX;
		into cursor Schnaps
		
	use in SchnapsTmp 
	
	&& report cursor = Schnaps
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform