Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to find a reference to SUM in Report
Message
From
28/04/1998 15:03:01
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00095384
Message ID:
00095496
Views:
24
I don't know if this is what you are looking for but I have a utility (DevLook) that I use when
I am searching for a term that I can't seem to find.

-myron kirby-

* ==========================================================================
*: Program: =DevLook()
*: Description: Looks for certain terms/phrases in an object.
*: Parameters: tcObj = Object name with extension
*: tcTerm = Term/phrase to look for
*: Returns: n/a
*---------------------------------------------------------------------------
* 07/07/97 (16:40), Myron Kirby-Created
* ==========================================================================

*--Set-Up ..................................................................
LPARAMETERS;
tcObj ,;
tcTerm

LOCAL;
laStruc ,;
lcFldName ,;
lcSetSafety,;
lcSrch ,;
lcFSrch ,;
lcObj ,;
lcTerm ,;
lnFlds

lcObj = tcObj
lcTerm = lower(tcTerm)
lcFSrch = [C:\Temp\t_Look]
lcSetSafety = SET([SAFETY])

SET SAFETY OFF
DIMENSION laStruc(1,5)
CLOSE DATA ALL


*--Processing ..............................................................
*--Get object structure
USE (lcObj) ALIAS fObj

lnFlds = AFIELDS(laStruc) && Get object structure

*--Look at each field
FOR lnX = 1 TO lnFlds
*--Must be char or memo
IF INLIST(laStruc(lnX, 2), [C], [M])
lcFldName = laStruc(lnX, 1)

lcSrch =;
['] +;
lcTerm +;
[' $ ] +;
[LOWER(] +;
lcFldName +;
[)]

*--See if the term is found in the current field
SELECT;
RECNO() AS [RecNo],;
lcFldName AS [SrchFld],;
*;
FROM;
(lcObj);
WHERE;
&lcSrch;
INTO TABLE (lcFSrch)

*--If found the term display the object field with the term
IF _TALLY > 0
SELECT fObj
WAIT CLEAR
WAIT WINDOW NOWAIT;
[Found: ] + lcTerm + CHR(13) +;
[In: ] + lcFldName

BROWSE;
FOR &lcSrch
ENDIF
ENDIF
ENDFOR


*--Clean-Up ................................................................
CLOSE DATA ALL

SET SAFETY &lcSetSafety

* (end of main) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

>>>Hi,
>>>
>>>I have a report that everytime I try to run it I get the error "Sum.prg Not Found". I have searched through the properties of controls and can't seem to find any reference to the the sum calculation. Is there a better way to search for any reference to sum within a report?
>>>
>>>Thanks
>>>
>>>Paul
>>
>>have you checked your variables?
>
>I think what he wants is a programmatic way of finding where in the report or any report a certain item is called out. I have need for something like that also.
----------------------------------
-myron kirby (mkirby2000@gmail.com)-
Previous
Reply
Map
View

Click here to load this message in the networking platform