I agree, it sounds like it works in the preview in the Report Designer because the tables or a cursor were open and selected, but when when it's run from within his code the table(s) or cursors are probably not open and/or in the selected area.
If that's the case, the fix is to either add a...
The only thing that comes to mind is the alignment properties.
Positions that are set at design time normally default to left, so the left position is fixed at the place you created them. However items that align right or center may vary a little bit at runtime to reflect the selected...
As a rule of thumb, when you get an error like that, it's giving you the exact reason for the error, a Data Mismatch Error, so you just need to take a look a data.
You only can sort an array if all the values are the same type. In fact, you can even sort an array of logical variables, where...
As a developer if I could make one change to SQL is that they remove the ability to use the DELETE command without any conditions.
The example code from @jedraw is a perfect example of how dangerous it can be. If you accidentally leave out the semicolon that lets FoxPro know there are...
The HAVING parameter is intended for aggregate functions, so you can't use it like that.
Since you seem to be new to SQL Queries, you should avoid using the delete function until you can first successfully do a SELECT with the intended results.
For example:
SELECT CustNo, count(*) as MyCount...
BE CAREFUL of lines like that in FoxPro, since you didn't include a semicolon, it will interpret the first line before throwing an error when it reaches the second line.
So that first line deletes EVERY row in the table before it reaches the (incomplete) second line.
In this particular case, I already wrote code to do those 3 types of calculations back in 1990, except back then the function used the fields in an existing table rather than as parameters, so I decided to refactor it so it could be used in other places and with other potential tables and field...
I've never been impressed by the hype over AI, and until recently every time I've tested AI by asking it to write code, I've never actually been given code that actually works.
I did two recent tests to see if Grok could write something that mirrors something simple, then something more...
Another interesting thing is that this odd set of rules is not just for fields and variables, so unless you have exact on or use ==, the order of your comparisons will have a direct impact on the result, so any shorter strings on the right side will only compare that number of characters on the...
A few things come to mind.
I'm not sure why you would get ALL the records, but when you compare 2 strings in VFP, especially something that has been trimmed, the default behavior is to only compare up to the length of the string being compared, so you will get a lot more matches.
For example...
All valid points.
We often see odd requests from people in these forums from developers who don't explain their question well. Then after we offer them advice or even pseudocode we come to realize they likely are modifying a system that was designed by somebody else years ago who had more...
I'm less concerned with the performance issues of whether to detect whether it's in preview or not and how many times it may call the function in any given report run.
Even if you guarantee the function is called only once per row, they still may run the report another day, so what I was...
Well said. I will add one warning.
Since you intend to run this when you run the report, just keep in mind that when you run your report, as long as you place the function in the detail area it will run one time per row, which could be a problem if your function is inserting rows into your...
I assume you are not familiar with writing in forums.
Capital letters are generally avoided except for occasional emphases, or in the case of FoxPro, they are often used as FoxPro commands, just like in the official documentation.
The fact that you felt he was angry when he replied is the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.