I searched a lot to find out how to do a "master-detail" style mail merge in word but i couldn't find an appropriate answer/tutorial.
my data look like this:
id name property
-----------------------------
1 John Doe employed
1 John Doe married
1 John Doe male
2 Don Joe employed
2 Don Joe single
2 Don Joe male
and the result should look like this:
with a page-break between every key record.
Does anyone know how this can be achieved through a Microsoft Word Mail Merge?
(i know SSRS,etc.. are better tools for this, but i have to use MS Word because on the client this is the only thing that's possible)
Yes - this is possible using WORDs mail merge.
I don't think you can do it with your data the way it is now. There's not much that can be done to manipulate the data before it gets to the mail merge.
You would need to clean up the data to combine the properties for each person into one field before you can do the merge.
Is your data in Excel? You can write some VBA to combine the properties field.
If it's in a database, you can use SQL to combine the fields using For XML Path.
Once your data is cleaned up, you would be able to use the Mail Merge Wizard.
For the Doc Type, select Letter and use a blank page (current document).
Then select your data.
The next step is to Write Your Letter. Type your field name (i.e. **Name: **) and click on the Insert Merge Field and select the field to insert.
Repeat for all you fields.
Related
I have a very big -super big- database of names.
The task is to find all the similar names (of the same person per se) despite some diffrences like :
first name, second name inversed --> John Doe & Doe John
two names or more (same ones) with light changes, maybe some
letters misplaced or something else --> Jonh Doe & John Deo
two names with some letters added --> Johhn Doe & Johnn Doee &
John Doe
names where another middle name inserted --> John Blair Campbell Doe & John Blair Doe
And so on..
I tried using the classical methods like soundex and leveshtein but the results were not very good, had results like : Amine depi and Amina dope are in the same group while they're diffrent
and It would take very long to perform the task on just a fraction on the data, as for my database, it would directly crash after a long time
I also thought of using another approach like cosine which uses numerical values and I though of finding a way of representing the names in a numerical way, or convert them (something like word2vec), I actually though of using directly word2vec with the whole database of namems as the text, but as expected it didn't work. Tried to codify the names in a low level way, like code ASCII for exemple, but the results weren't good neither.
So I thought of Clustering.
So I tried using DBSCAN. I found a way to use DBSCAN clustering with a custom distance metric and used leveshtein distance. (If you ask me why DBSCAN? It is because I don't know the numbers of similar groups of names which are in the database in the beginning)
I did have some results, but very poor performance overall. It would either give the same exact ones, John Doe and John Doe int he same cluster, or nothing at all, and would even skip some exact ones.
Do you have a suggestion for performing this task ? preferbly using clsutering or another smart way since the database is very big (more than 500 000 line and up to millions ) so I cannot iterate alot.
I am open to suggestions or propositions !
Especially if you worked on something like this previously or similar to this, Thank you in advance.
Try AgglomerativeClustering.
Sample code:
clustering = AgglomerativeClustering(
n_clusters=None,
distance_threshold=0.3 # smaller threshold meaning more strict similarities, and more clusters
).fit(your_vectorized_name_list)
print(f'total clusters: {clustering.n_clusters_}')
I have a report where I list peoples addresses and some extra information.
At the footer of the report I have a sub report with just the names of people sorted by first name.
I would like to put an A before all the people with names that start with A and a B before people that has names that start with a B and so on. Is there a function built in for this?
Something like this:
A
Adam
Anton
B
Bob
Bert
Your explanation and your example are different, below solution will give output of your example.
Create a formula to extract first character.
#firstcharacter //formula name
Assuming field name as field1.
field1 [1]
Now in your subreport group by this formula and place field1 in details.
If this is not you are looking for let me know.
I would like to know who to enable/implement in phplist a sex-dependend salutation.
Eg. "Dear Mr. Michael Meyers" or "Dear Mrs. Eva Evangelista" depending on the "gender".
Did not find any possibility to do this.
Well, there's no such feature in PHPList per se.
But what you can do is add a new PHPList attribute called "salutation".
New subscribers will fill it up in the registration form.
For old subscribers, export the list to a spreadsheet, and add Mr. or Mrs. in each row*.
Finally, import the spreadsheet back to PHPList.
* An easier way to accomplish it is add a temporary column and write just 1 in it if the person is, for example, male.
Then in the real column do something like:
if(d2="1", "Mr.", "Mrs.")
Before you save it as CSV make sure to convert the real column from formulas into values, and delete the temporary column.
this is what I´m trying to achieve:
As per buttonclick I want to populate a textfield in table A with all records from table B that have a certain value.
Kind of:
"Catch all records in B where field XYZ is 99 and put them in this textfield."
Thanks for your help! I am using FM13!
Edit:
I have an "orders" table where the order-id is a serial number. I use it to write bills from the exact order to another table.
In certain cases an order is too less for one bill, so for them i create entries in another table called "smalljobs".
But: In the smalljobs table there is one field where i can enter a specific order-id - where i write the bill on, in my case say "5".
Let´s say orders "10, 12, and 13" are small-jobs. I have one big order where I can bill smalljobs onto - in my case maybe order "5".
All I want to do: add one script to populate a certain textfield with entries from "smalljobs" where my current order-id ("5") is identified as fitting, and get Title, Costs, etc.
I was wrong from the beginning. I had to relate the "smalljobs" to a certain specific order-id, and get the informations I wanted via GetNthRecord(fieldName;recordNumber).
I have created a cross tab however if I have a firstname field it merges the rows together if there are two names which are the same. How do you get it to display the names in the each row. In the example below Sarah is not displayed twice as the cells are merged together.
Firstname Lastname
Judy Collins
Sarah Dane
Smith
Joe Dine
Mary Lane
It sounds like you grouped your crosstab on the first name only. I would recommend:
Make a new Formula (Call it "FullName")
In the formula, combine the first name and last name, e.g. something like {First Name}&{Last Name}
Edit your crosstab to group by the FullName formula instead.
Does this help?
EDIT
Based on your comment, I don't think your comment is with Crystal. You need a "unique ID" of some sort, a distinct number for each person. My original suggestion was trying to use the user's full name as a unique ID, but that won't work if your dataset is big enough to include multiple people with the same name. Does your dataset have any kind of unique ID? What is this crosstab trying to display? There might be a better way.