This topic is locked
[SOLVED]

 Button to call the document.

9/18/2010 4:38:15 PM
PHPRunner General questions
S
sandrotab author

It would be possible to insert a button in edit a record, from which he can be called a document format .rtf present within a given location in the document and bring some fields.
Example: I have to generate a letter from a word document (.rtf) which bring the Customer's data, taken from the current record.
Thanks for any suggestions and examples.
Sandro T.

Sergey Kornilov admin 9/18/2010

Adding button is not a problem however you need to write the code that generates RTF document. That's quite a big task.
Here are a few links that can help:

http://www.freeopenbook.com/php-hacks/phphks-CHP-5-SECT-16.html

http://paggard.com/projects/rtf.generator/

S
sandrotab author 9/18/2010



Adding button is not a problem however you need to write the code that generates RTF document. That's quite a big task.
Here are a few links that can help:

http://www.freeopenbook.com/php-hacks/phphks-CHP-5-SECT-16.html

http://paggard.com/projects/rtf.generator/


My intention is not to create a rich documentation on the fly, but to retrieve it with a button and bring in some fields document the current record.

Can I have an example of how to invoke an rtf from a button?

Sergey Kornilov admin 9/18/2010

You need to explain what "invoke an rtf from a button" means.

S
sandrotab author 9/19/2010



You need to explain what "invoke an rtf from a button" means.


In my application I have a record on the "File / Image" with whom do I upload a RTF template file.

Then I print the RTF file with values drawn from fields of the current record.
Example: I print a letter to the Customer in RTF format and the letter must be completed with data from the field of current record.
But if this thing works, I can think to put a button on the form edit the record of the Customer to call Rich.

Sergey Kornilov admin 9/20/2010

I see what you saying.
I guess you need to write PHP code that is able to populate RTF document/templates with current record fields. Once you have this part working you can insert a button in PHPRunner and paste this code to OnServer tab.