Using variable in text to print

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Locked
User avatar
BRobinsonS
Posts: 355
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada
Contact:

Using variable in text to print

Post by BRobinsonS »

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?
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Using variable in text to print

Post by Gaev »

Brian:
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?
Have you looked at the PopulateStr command ... one of NeoBook's hidden gems.

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.
User avatar
BRobinsonS
Posts: 355
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada
Contact:

Re: Using variable in text to print

Post by BRobinsonS »

Thanks for the tip.
I'll work on that.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
Locked