Hi
I have a problem in Windows Form. Let me explain in detail.
I have a listbox 1,combobox1,button1,button2,Richtextbox1 with me on my windows form.
Combobox1 contains the customer number
Listbox 1 contains the templates which are already created and stored in the DB.
so listbox contains the following.
1. Template1
2. Template2
3. Template3
** Next My combobox has all customer numbers retrieved from the database.
*-* When i select a template from listbox, (for ex template 1 ) and click on button 1, the template is displayed in the richtextbox.
Template looks as follows.
Dear <Customer>
The project date is < Project date>
The Name of the project is <Project Name>
Thanks.
Next, when i select a customer number from combo box1 and click on button2, the values underlined in the template has to be replaced by the values from the DB realted to that customer number. So far i have done thsi replacement and it looks like this.
Dear Jason
The project date is 01/01/2008
The Name of the project is <Time Scheduling>
Thanks.
MY MAIN PROBLEM STARTS HERE
Sometimes, for some of the customer numbers from combobox1, the out put is multiple sets of records.
For Ex, if the o/p of one of the customer number is 5 records, the template should repeat itself 5 times in richtext box( in separate pages) and the data like <customer>, <Projectdate> and <project name> has to be replaced at all places. To be specific, if the o/p from DB is more than once, the template shud be repeated itself depending on the output, and each should come in separate pages in richtextbox.
it looks like this.
Dear sairam
The project date is 01/01/2007
The Name of the project is india
Thanks.
Dear sairam
The project date is 10/10/2009
The Name of the project is USA
Thanks.
Dear sairam
The project date is 04/11/2006
The Name of the project is <Japan>
Thanks.
Dear Konala
The project date is 04/11/2001
The Name of the project is <JChina>
Thanks.
Dear reddss
The project date is 04/01/2006
The Name of the project is <UK>
Thanks.
This how the o/p shud look like
Please Help me in this ....
Waiting for ur reply guys...