Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show memo file data in a report

Status
Not open for further replies.

lordhawkins

Programmer
Joined
Sep 25, 2003
Messages
64
Location
SV
How may I show the contents of a Memo file in a VFP70 sp1 report?
I get a cursor with an SQL-select command that brings the memo file... But when I try to show it in the report it shows only "****"
I've tried using alltrim(), substr() and substrc() both in the SQL-select expresion and in the field on the report form

What I'm doing wrong?
 
As far as I know SQL doesn't really support memo fields. You could save the 1st 254 characters into a character field.

I don't use the built in reports, but I assume it would be possible to save each memo to a variable and then report using the variables.

When I need to export memos with other values I usually just SCAN...ENDSCAN and automate the values directly into an Excel sheet.

My faq184-4704 Export a Formatted Table to Excel using HTML should also work.

Brian
 
What sort of data is in the Memo field? Can you show a bit of the SELECT code? I've tried a few examples and can't duplicate what you are describing. I'm selecting from a table where the Memo fields aren't empty, and the report displays the first 5 characters and then the first 20 characters on two lines in the detail band - no "*****"'s

Rick
 
Lordhawkins,

If you do a SQL SELECT to obtain a memo field form a table, the field will show up in the resulting cursor as a memo. The usual workarounds is to apply a function such as LEFT(MemoField,254), which will make it a Char field:

SELECT LEFT(MyMemo,254) as MyMemo FROM MyTable

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks a lot for your interest...
I'm a embarrased a lot, but the problem was that the field was totaled [purpleface].
VFP keeps this setting no matter the format of the report field is character or numeric.
About the left() or substr() on the field, they work ...!!! :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top