I'm developing a crystal report that is a letter. The text of the letter needs to change depending upon the value in a particular field. If someone can point me to a subject in a book, I can probably figure it out. I'm just not sure what to look for.
So what you are doing is composing a form letter and the paragraphs of the boddy of the form letter will change depending on the situation....Have I got it??
if so then in the header section you would put the name and address stuff
As far as the text in the body of the letter there are a couple of ways to go about it (we will talk about how these options are turned on/off later)
1. You could split the Detail section into many subsections. Each subsection would have a text box with hard-coded text of a particular standard paragraph. (you can do this in the page footer as well to add a paragraph of legal fine print
This is very useful when you have large...never changing... standard blocks of text.
2. You can also place a string database field in a Detail Subsection. On normal string variables you can have only 254 characters but you could use memo database fields to pass down larger blocks of variable text.
3. you can use formulas to create small changes to a text line (NOTE: these formulas handle at MAX 254 characters
an example of a formula could be:
*************** start formula **************
stringvar result := "(say something here)";
if {?Parm1} = 1 then
result := result + "(say text for parm1)"
else if {?Parm1} = 2then
result := result + "(say text for parm2)"
else
result := result + "(say text for default condition)";
result;
*********************************************
those are main options....
then set up a number of parmeters the are flags used to turn these text options on and off...individual fields by using the conditional Suppress in the fields Format editior
and Detail/footer Subsections through the conditional Suppress in the Format Section .
with one report and many parameter controlled options as will as text fields you can create many different form letters.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.