Hi, for that you can use:
string Filename = this.MainDataSource.CreateNavigator().SelectSingleNode("Xpath", this.NamespaceManager).Value;
You have to replace Xpath by your own for that right click on your field on"Data source" and click copy Xpath, after at you paste it in the code.
After that, you have to replace all your hardcoded path like:
this.SaveAs(@"\\ServerName\Share\test.xml");
by
this.SaveAs(@"\\ServerName\Share\" + Filename + ".xml");