|
-
Jan 30th, 2004, 04:20 AM
#1
Thread Starter
Fanatic Member
Coding Advice
Hi All i have been building a small system to dyanmically create letters from windows forms i have built a letter designer as such which is purely a rich text box and a load of combo's contained in each combo are field items which can be inserted in the letter these field items are stored in a table and are formatted as such
[{NAME}]
[{ADDRESS}]
Etc.
So when your using the letter designer you simply select a field from a combo and that then sticks it in the rich text box so example
Dear [{NAME}]
blah blah blah....
So this is the bit im having trouble with
I have a win form that contains all the elements required to fill a letter, but how to link them ?
Because the field items are contained in a database they are up to the user to define, this now gives me a massive headache
i was thinking about having a COM called letterGenerator to which i pass in certain properties depending on the form i will have to pass a property to show which letter to generate (oh yeah letter templates are also saved in the db)
i was wondering if theres any way to automaticaly generate properties depending on what field items are stored for example doing some kind of loop of my LetterFieldItems table and then setting the properties for each item in the table......
This way when i call the COM i would see what properties i can assign depending what the user has defined
Any comments on this method or any other methods you have in mind are welcome
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Jan 30th, 2004, 05:35 AM
#2
Can you use XML? It is a self-defining language so your code should be able to read in from an XML file the structure and field names of all the data. I don't know which database engine you are using but Microsoft Access can export XML files.
I haven't got much of an idea how to do this, but maybe it gives you something to think about?
This world is not my home. I'm just passing through.
-
Jan 30th, 2004, 06:19 PM
#3
Addicted Member
i wish i could help,
but i cannot understand what you
really wanna do...
is it a function like the "mail merge" (in MS Word) ??!
or is there differences ??!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|