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!

editing report on runtime

Status
Not open for further replies.

nevin2007

Programmer
Aug 21, 2009
31
IR
hi all
i am try to give the ability of changing text of report body in one application to user.the report is a mail text and some field.
the field data get from a database. the user must have ability to change the text but they cant delete or edit field. i used vfp9 sp2 and protect field from delete and properties dialog box and behavior is ok.
i cant protect text Because i want user can modify it but the problem is that user can access to properties dialog box.
can any one help me ? how can i prevent access of user to properties dialog box ? is there the other way that obtain editing report in simulated scx form ?
 
If you use a table (or cursor) for your e-mail report, then simply give your user a form to change this text before running the report.
 
If you use markros's solution and create a read/write cursor then you can use that as the record source for a grid and protect all the columns except the one that you want to let the user alter.

Geoff Franklin
 
You can't limit what the user can do if you give them the ability to modify a report FRX format. To limit what they can change you need to do as Markos has suggested and give them a temporary cursor to edit and then use the edited field from the cursor as a field in your report format.

Andy Snyder
SnyAc Software Services Hyperware Inc. a division of AmTech Software
 
along the same lines as the other suggestions....

using moxiedata ( you can embed RTF into a memo field and print with mixed fonts, bold, alignment etc.

Then you can prompt the user to create a customisable RTF text along the lines of the 'using the rich text control' in vfp's solution samples.

hth

Nigel
 
hi markros
i see your suggestion but the problem is that i dont know where the field is in the user mail text and maybe user make the sentence long or short. for example mail text is :

dear /field name/
we are expect seeing you at /field time/ in /field Location/

user can change the sentence and make it long and /field time/ must go to the other text line. Because of that i think i cant use FORM
thanks
 
I think I've been looking at the wrong problem. I was thinking of a report where the bulk of the content came from the field data and you wanted the user to be able to change a few words here and there. It seems rather that you want the user to be able to write the bulk of the text in the report and to be able to insert a varying number of fields from the table as and when required. It sounds like a job for a mail merge in Word rather than for the Fox report writer.


Geoff Franklin
 
I can't see what your user must be able to get changed.
Is not this just normal reporting?
-Bart
 
hi markros
dear /field name/
we are expect seeing you at /field time/ in /field Location/

user can change the sentence and make it long and /field time/ must go to the other text line. Because of that i think i cant use FORM

Nevin,
use a memo field for the reply, the user can than give a reply as long as he likes.

Jockey2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top