.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Mail merge in SSRS reg,.

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server

Hi !

I did see the mail merge layout designing. 

But i need to know the following,

whether is it possible to send the mail directly to the mail id (From Data base) being in the report ?

As in subscription we need to add the users name and id to which we need to send the mail id, which may be hard coded.

But in my case if i wanna send the payment reminder letter to the customers, i 'll design a report holding informations and wanna send to the customer mail id taken from the db..

is that possible in SSRS ? How ?

Thanks !


View Complete Post

More Related Resource Links

Mail Merge




I am after creating a mail merge documents from datasource and .dot template file on server side. Can you give me an idea how i will achive this?


Thanks in advance.



Syed Hussain



Mail Merge


Hi Friends,

I Have Created Mail Merge By connecting With MySql Database ...When it executed an 6 record repeated as for ex:Ramesh is First Name when button click it will created for 6 times Ramesh Ramesh Ramesh Ramesh Ramesh Ramesh how to solve i will give you coding please correct and post as soon as possible..

sing System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

Microsoft Word Mail Merge Problem


I wrote code to create label from Microsoft Word Mail Merge using Visual Studio 2008 ASP.NET C#. This is my code:

public void CreateLabel(string strCSVPath, string strTemplatePath)
            Object fileName = strTemplatePath;

            Object missing = System.Reflection.Missing.Value;
            Object oEmpty = "";
            Object oFalse = false;
            Object oTrue = true;
            Object oAutoFormat = word.WdOpenFormat.wdOpenFormatAuto;

            word.Application wApp = new word.Application();
            word.Document wDoc = wApp.Documents.Open(ref fileName,
                ref missing, ref missing, ref missing, ref missing, ref missing,
                ref missing, ref missing, ref missing, ref missing, ref missing,
                ref missing, ref missing, ref missing, ref missing, ref missing);
            word.MailMerge wMM = wDoc.MailMerge;

            wMM.OpenDataSource(strCSVPath, ref oAutoFormat, ref oTrue, ref oFalse, ref oTrue,
                                ref oFalse, ref oEmpty, ref oEmpty, ref oFalse, ref oEmpty, ref oEmpty,
                                ref oEmpty, ref oEmpty, ref oEmpty, ref missing, ref missing);

            wMM.DataSource.QueryString = "SELECT * FROM " + strCSVPath;

            wMM.Destination = word.WdMailMergeDestination.wdSendToNewDocument;


Nice way to ask user to choose a document and then list of recipients for a mail merge?


I'm building what could be described as a mail merger. A user chooses an email template, chooses a list of recipients, and the application performs a mail merge.

I could attach the workflow to contact lists, in which case I only need to ask the user for the email template to use.
I could attach the workflow to document lists, in which case I only need to ask the user for the recipients to sent to.

I decided though that I'd bring them to a starting page and let them choose both. But I've a horrid and barren looking aspx form.
Is there any nice way of letting them browse for the documents and contacts? At present I'm using a couple of dropdown lists listing all documents on the site, and all contact lists on the site, but it's a bit butt-ugly :D

I wrote a book :) http://www.amazon.com/Microsoft-Visual-Studio-2008-Programming/dp/0071604081

mail merge online



is there a way to embed any asp.net code into php to produce a letter mail merge which would produce letters in a word document from names and addresses from mysql database?

many thanks 

mail merge with iTextSharp library?



i'm looking for a way to implement a simple ail merge with iTextSharp library.

I have data stored in database (addresses) and a pdf template.

I need to create a single pdf file where each page contains one address.

How can i do this?


SSRS 2008 / Vertical Scrollbar in e-mail delivery.



in SSRS 2008, a report delivered by e-mail displays a vertical scrollbar. (No scrollbar in native html/web rendering)

The same report deployed to 2008 "R2" does not display the bar in the e-mail.

Finicky report developers in a slight funk.

Possible patch for the 2008 behaviour?



SSRS 2008 e-mail activity HTML - TEXT


Hi there

i've got description where i get from an email. Now i have HTML inside.

I created a placeholder but my problem is that I have images they aren't avaible now and i get an error.

is there a way to convert html to text without tags.


One who can read, have a clear advantage!

SSRS 2005 - Failure sending mail in e-mail subscription



I added a new TimedSubscription to a report.  However when the report ran, it hit an error.  The Status text was as follows.

Failure sending mail: The permissions granted to user 'domain\user1' are insufficient for performing this operation.

(assuming domain\user1 was my account)

I have the Content Manager role to the report and its folder.  I could run the report interactively with no issues.  This particular report does not require any parameters.

The odd thing was this only happened when I selected "Include Report".  If I selected only "Include Link" it would be fine.

To troubleshoot, I changed my role to System Administrator in Report Manager and re-tried.  The same result was observed.  However after I added my user account, domain\user1, to the local Administrators group, the problem went away!

What rights (in SSRS, local server, folder, etc) does a user need to have in order for the e-mail subscription with file inclusion to work?

The systems involved are as follows.

Windows Server 2003 (SP2)
Microsoft SQL Server Standard Edition, 9.00.4053.00



Best regards,


Mail SSRS report



I want to create an on error table. I want to show this table in a ssrs-report.

I want to mail this ssrs-report, when there is data in the table. It is possible that there is no data in the table, then the ssrs-reportis empty and I don't want to mail it.

Is that possible?

E-mail not getting delivered SSRS SharePoint Mode



when im trying to send email subscription to users, the message it shows is

email sent to ....

but i dont get any email.

this is happening only in integrated mode

pls do suggest me on this.What would be the possible reasons??

how can i fix it?

Thanks a lot

Merge SQL to Excel--Need .Net button to open on fly and have current SQL data!


           Hello all,
I do not know if this is the proper place to ask this, but my question is...
I have a SQL DB and I want to convert it to Excel Sheet (I did this using the wizard)!
In my aspx page I have a button.  So when I press this button I want the Excel sheet to open!  But I need the Excel sheet to show me the up to date information that is in the SQL DB.  

where can i download from SSRS?


Hi all,

My  machine is alread installed with Sql Server 2005.  I need to install sql server 2005 reporting services as a add-on.

Where can i download this from. Can anyone post the link here..?


Thanks in advance


MDX Query parameter from SSRS


I've a MDX Query that has where clause as shown below.
I'm designing report using SSRS 2008. How can i pass date as parameter ? I tried to setup @from and @to as parameter but not working ?
any ideas....

WHERE ( {[Date Central].[Calendar Date].[2010-04-01 00:00:00]:[Date Central].[Calendar Date].[2010-08-30 00:00:00]} )

need it to work as
WHERE ( {[Date Central].[Calendar Date].[@From]:[Date Central].[Calendar Date].[@To]} )



How to change text in columns in SSRS?


I need to create a complex report and export it to Excel. 

In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. Any ideas please. I am new to SSRS and tried out many ways but didn't get it.

Email Help (System.Net.Mail)


Hi I have a annoying problem. 
I have created a page which takes users details for a quote.

I have then created the form to be emailed to both the user and myself. (Which works fine ATM)

However I would also like to be able to attach a file containing terms and conditions to the email.

I have tried doing this using 

EmailMsg.Attachments.Add(new Attachment("C:\\attachme.txt"));

But everytime that line of code is hit it fails and is caught by my try catch.

Take that line out and the email sends fine, put it in and it breaks the whole page.

Am I missing something really obvious?

Toolbox: Create Graphs, Send E-Mail, Spell-Check, and More


Turn boring data into stunning graphs, create, parse, send, and receive mail messages from code, and more.

Scott Mitchell

MSDN Magazine August 2007

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend