We are trying to providing MS-Word's Mail-Envelope facility to end users.
Address is being fetched from oracle database as below:
AddressLine1 || chr(10) || chr(13) ||
AddressLine2 || chr(10) || chr(13) ||
CityAndZip || chr(10) || chr(13) as Address
Then in SSRS report output is showing like this, which is expected:
1234 SomeRoad
SomeOther Address
SomeCity 12345
When this SSRS report is exported into Word file, the output still looks the same. However if you look closely you will see at the end of line we have 'line feed' and 'carriage return character'. With data if you tried to use Mail-Envelop facility then the address doesn't comes into address box automatically.
1234 SomeRoad↵
SomeOther Address↵
SomeCity 12345↵
If we change these 'return characters' into paragraph Symbols manually. By going at the end of each line and press delete(the next line comes up) and then press enter(the addressline goes to line below again). This will remove the return character(↵) to paragraph character (¶). Then if you go to mail-Envelope option then address will be populated properly.
1234 SomeRoad¶
SomeOther Address¶
SomeCity 12345¶
Approaches we have tried:
Please suggest if there is other way to resolve this problem. Or if there is better approach to satisfy the requirement itself. Thanks.
Alright, so what we have used is placeholders in SSRS report. Insider text box, put some placeholders, that are generating '¶' and next line when export into word. You can add some static text along with placeholders(for dynamic data). With this we don't need to change SQL for getting data in particular format.
E.g.
Address:
[Placeholder-AddressLine1],
[Placeholder-AddressLine2]
[Placeholder-CityAndZip]