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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging of two (or more) data fields

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
Hello, This is more of a yes/no as I am not the person working on the project.

Can you have a field that pulls data from column1 but has column2 inserted into it. Example [tt]column1 = 'Hello, Thank you for your order of <column2> widgets. It will be shipped <today>.'
column2 = 42[/tt]
In report you would have
[tt]Hello, Thank you for your order of 42 widgets. It will be shipped 4/11/2011.[/tt]

What I was wondering is there a way to do this (VB.NET and SQL Server) such that a different template is not needed if the column1 text is changed?

Thanks

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
 
i would conditionally say 'yes'

i think what you really have is 4 fields/values.

1. text part 1 = Hello, Thank you for your order of
2. value 1 = <column2>
3. text part 2 = widgets. It will be shipped
4. value 2 = <today>
 
I thought that might be the case.

The problem is we have 160 plus letters that we would like to move from mail merge to Crystal. The bulk of the letter changes between each letter. It gets more complicated but I think you have answered my question. Thought about having a database table to hold the text and using .Net to build the Crystal report. Looks like the developers will have fun.

Thanks

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
 
If the letters contained standard characters (e.g., ^ and +) at the point where the two fields needed to be inserted, you could handle this by creating a formula like this:

replace(replace({table.column1},"^",{table.column2}),"+",datadate)

-LB
 
Thanks lbass, That makes sense. I let them know.

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top