Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New User, Expression question
Message
From
25/07/2002 10:37:05
 
 
To
25/07/2002 09:17:29
Darrin Hughes
Chena-Don Textiles and Armory
Jacksonville, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00682288
Message ID:
00682498
Views:
16
Darrin,

You seem to be doing something different now. Originally, there was a SELECT table statement, and a report that printed the entire table. My understanding was that the report worked, but it printed some unwanted records. So I suggested a SQL-SELECT statement that would select only the records you wanted, and would order the records (instead of using an INDEX statement). Did that SQL-SELECT statement not work properly for you? What happened when you ran it from the command window and BROWSEd the results?

Perhaps you have made modifications to the report, and put some expressions in the PRINT WHEN that are causing problems. I think you should be using the original report provided to you by the third party developer.

As far as your code below, you have two SQL-SELECTS. Which one of these are you basing your report on? I added an ORDER BY clause to the first one, and eliminated the INDEX line.

>Ok, plugged it into the source code where you said. Good news is I didn't get the error message. Bad news is it kicked out eleven pages of nothing but 0.00 in the form fields... any idea why?
>
>Perhaps I'm trying this in the wrong place altogether? I did put together the following to tell it what entries to look for. What could I add to tell it not to look for the "LP"s and 0s?
>
>
>
DO CASE
    CASE lcInvType = "WP"
        SELECT in_stock, in_code, in_des, ROUND(in_onhand,2) as in_onhand, ;
                in_stdcst, ROUND(in_onhand*in_stdcst,2) as inv_dollars ;
            from cdiinmas ;
            WHERE in_code = "WP" AND in_stkloc = "CORE" ;
            order by in_stock ;
            INTO CURSOR inventory readwrite
	* INDEX ON in_stock TAG instock  && no need for this, add ORDER BY clause above
	SELECT inhistock, MONTH(inhidate) as month, sum(inhiqty) as quantity ;
            FROM cdiinhis ;
            WHERE inhistkloc = "CORE" AND ;
		(INLIST(SUBSTR(INHIDOC,1,1),"P","1","4") ;
                OR INLIST(SUBSTR(INHIDOC,1,2),"01","04","05")) AND ;
                (inhisource = "IN" OR inhisource = "OE") AND ;
                (inhitype = 1 OR inhitype = 0) AND ;
                inhidate >= lnStartDate1 AND ;
                inhidate <= lnEndDate6 ;
		INTO CURSOR qtysummary READWRITE GROUP BY inhistock, month
>
>I have no idea how to build this exclusionary statement. I really think I'm just suffering from a case of weapons grade stupid.
>
>>You plugged it into the form's code? Or into the command window?
>>
>>All of the lines below are the SELECT statement. Did you paste this entire section into your command window? After pasting into command window, you hit enter at the end of the command. Also, make sure you database is open. I don't see any sort of syntax error in the statement...
>>
>>>Almost there, I plugged it in and It gave me "Unrecognized command verb", any changes to syntax you can recommend?
>>>
>>>
>>
>>select * from finalInventory ;
>>    where left(in_stock,2)<>"LP" ;
>>        and iutotal<>0 ;
>>     order by in_stock ;
>>     into cursor finalInventoryCursor
>>
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform