Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing for a Group/Total report
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00147217
Message ID:
00147292
Views:
21
>>>>>I tried it, Fred...didn't work. Still get the same error when i want to run the report.
>>>>
>>>>Is your report using a private datasession? Change it so it doesn't.
>>>
>>>I didn;t use a private datasession when I created it
>>
>>Hi I missed the beginning of the thread... but, you are using SQL select to table ? Then you want to index the table?
>>
>>Try this...
>>
>>select * from blah into table mytable
>>
>>index on myfield tag myfield of mytable
>>
>>
>>The above should leave the last index you create as the active one, but you should be able to do...
>>
>>set order to tag myfield
>>
>>if that doesn't work, try..
>>
>>set order to tag myfield of mytable
>>
>>BOb
> Bob,
>
>Here's my code...maybe it cxan shed some light
>
>SELECT TRIM(temp.ass_l_ata), temp.ass_sclass, CNT(*) FROM temp ;
>WHERE (temp.mnemonic = gcProject) AND (NOT EMPTY(temp.ass_sclass)) ;
>AND (temp.ass_l_grp = gcGroup) AND (temp.ass_l_dept = gcDeptNo) ;
>AND BETWEEN(temp.ass_l_date,gdStartDate,gdEndDate) ;
>ORDER BY 1,2 ASC;
>GROUP BY 1,2 INTO TABLE category
>
>SELECT category
>INDEX ON exp_1 TAG exp_1 of category
>SET ORDER TO TAG exp_1
>
>REPORT FORM category PREVIEW
>
>
>Thanx

I'd be real wary of using TRIM in a SQL SELECT field. If the first value it retrieves ends up 0 length, this can cause all sorts of problems. And since you're doing an order by the 1st column, there should be no need for a separate index, unless you are using it to manipulate the cursor somewhere else in the code. Have you tried to browse the cursor BEFORE you do the report? Is it in the proper order then?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform