I have an app to create and edit different custom letters.
The text is stored in a DBPro table and printed using Report Designer.
The header is the same but text varies.
The text is plain text but I want to use variable(s) in the text to personalize the text.
Is there a way to do this Report Designer?
Using variable in text to print
Moderator: Neosoft Support
- BRobinsonS
- Posts: 355
- Joined: Sun Sep 25, 2005 9:00 pm
- Location: Ontario, Canada
- Contact:
Re: Using variable in text to print
Brian:
With it, you can define a plain text file as a kind of "Template" (with interspersed Text and NeoBook Variables) ... then issue this command to ...
- read this Template file
- replace all NeoBook Variables with their current values
- store the result in a specified variable
in your case, you could do a FileWrite of your "custom letter template stored in DBPro Table record" before issuing this command ... and then another FileWrite of the result of the PopulateStr command ... and finally, use PrintTextFile or PrintdataFile to print the content.
Have you looked at the PopulateStr command ... one of NeoBook's hidden gems.I have an app to create and edit different custom letters.
The text is stored in a DBPro table and printed using Report Designer.
The text is plain text but I want to use variable(s) in the text to personalize the text.
Is there a way to do this Report Designer?
With it, you can define a plain text file as a kind of "Template" (with interspersed Text and NeoBook Variables) ... then issue this command to ...
- read this Template file
- replace all NeoBook Variables with their current values
- store the result in a specified variable
in your case, you could do a FileWrite of your "custom letter template stored in DBPro Table record" before issuing this command ... and then another FileWrite of the result of the PopulateStr command ... and finally, use PrintTextFile or PrintdataFile to print the content.
- BRobinsonS
- Posts: 355
- Joined: Sun Sep 25, 2005 9:00 pm
- Location: Ontario, Canada
- Contact:
Re: Using variable in text to print
Thanks for the tip.
I'll work on that.
I'll work on that.