We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Nested Mailmerge Sample

Thread ID:

Created:

Updated:

Platform:

Replies:

77262 Oct 23,2008 03:30 AM UTC Oct 23,2008 10:31 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: DocIO
Farouk Yew Abdullah
Asked On October 23, 2008 03:30 AM UTC

Hi all,

Anyone has any idea the difference between the Template_letter and Template report. The former will page break nicely. I see the codes for executing both the same. It must be something in the former doc that cause it to page break after the <>. Can someone help?

Regards



Bhuvaneswari P [Syncfusion]
Replied On October 23, 2008 10:31 AM UTC

Hi Farouk,

This page break due to the input command string we passed in the sample. In this sample for Template_letter we retrieved 3 employees(Select TOP 3 * from, Employees ) next command SELECT DISTINCT TOP 2... – we
take ONLY! 2 customers for each employee and then the command "Orders", "SELECT DISTINCT TOP 2 - we take only 2 orders for each.
So first one employee record followed by 2 customer records then 2 order record after the page is over, so it goes o next page. You can test this by increase the number of order and customer record, and then see the output it looks like Template_Report.

Change the code like below:
DictionaryEntry entry = new DictionaryEntry("Employees", "Select TOP 10 * from Employees");
commands.Add(entry);

// To retrive customer details
entry = new DictionaryEntry("Customers", "SELECT DISTINCT TOP 10 Employees.EmployeeID, Customers.CustomerID,Customers.CompanyName, Customers.ContactName, Customers.Address, Customers.City, Customers.Country FROM ((Orders INNER JOIN Employees ON Orders.EmployeeID = Employees.EmployeeID) INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID) WHERE Employees.EmployeeID = %Employees.EmployeeID%");
commands.Add(entry);

//To retrieve order details
entry = new DictionaryEntry( "Orders", "SELECT DISTINCT TOP 10 OrderID, OrderDate, RequiredDate, ShippedDate FROM Orders WHERE Orders.CustomerID = '%Customers.CustomerID%' AND Orders.EmployeeID = %Employees.EmployeeID%" );
commands.Add(entry);

Please try this and let us know if you need any further clarification.

Best Regards,
Bhuvana



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;