Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Showing month totals in grouping of report
Message
 
 
To
22/09/2008 16:45:07
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349560
Message ID:
01349821
Views:
13
>>>I need to show totals in a grouping of a report. This SQL just simply gets the total count meeting the criteria.
>>>
>>>SELECT ;
>>>	COUNT(*) AS DOSCnt ;
>>> FROM EligAct ;
>>>	WHERE BETWEEN(EligAct.DOSBegin,THISFORM.DOSBegin,THISFORM.DOSEnd) ;
>>>	INTO CURSOR ReportCursorSummary
>>>
>>>I need to change it, or create another one, that will show a breakdown by month for the same criteria.
>>>
>>>Jan: 12
>>>Feb: 100
>>>Mar: 325
>>>
>>>Or...
>>>
>>>Jan: 12     Feb: 100     Mar: 325
>>>
>>>I can do the SQL, but what I'm really wondering is if this approach is the best way. If not using MONTH, etc in the SQL fields, what would work well? I need to do it in a grouping due to some shapes in the report that only display correctly if they just come under the last grouping. I need the summary totals to be in a grouping or they will look odd with lots of white space possible between them and the last detail line.
>>
>>Can you be more specific about what the report looks like ... what the data driving the report looks like ... and exactly how you want these totals to look on the report. There are several ways to come up with totals by month, but I need to know more about what you're trying to achieve to give you the best solution.
>
>I wish we could upload images/screenshots.
>
>I have 2 cursors created; one that feeds the detail and one for the summary. Basically, there is a date displayed in a left column, and then some other non-relevant fields to the right of that, all on the detail line. There is a grouping by the date, with no repeated values so the date only shows up once, on the first line in the grouping. There are boxes/lines that give it a nice look, but it only seems to work well if I pull the bottom of the box just to the bottom of the grouping footer. I've added that one, which groups on a value of .T., just to have a place to put the summary information directly below the first grouping (date). And, let's assume that there are only like 10 detail lines in the result, so the last one ends in the middle of the page. Any other way than using the fake grouping I've tried either puts the summary information at the very bottom of the page or messes up the boxes/lines. Right now the boxes/lines fill-up the entire page regardless of how many detail lines there are. We like that. Just need to find a way to get the month totals, based on the date range in the where clause, to display just below the last detail line at the end of the report.

Based on your description I would say go ahead with extra cursor for monthly totals.

BTW, there are free sites to upload images. See Re: Some space for screen shots - suggestion Thread #1325573 Message #1325690
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform