The main problem I encountered was trying to convert it to C#, but also that I think the layout of the form I have taken over may be completely different to the layout provided by Matt. I have just started this job and have been given a form to update the print view for. The form allows the user to go in and enter some details, which then creates a step by step guide. The layout of the data source is:
myFields
-> SOPMain
->->OperationDetail (Repeating Table) (Contains: Number, Name, Description, Points, Picture, additionalFile, anotherFile)
->Footer
The print view was almost complete, except for this slight issue, and the form is currently being used by the business so to be honest I was hoping for a 'Right click -> Don't allow rows to break over page' style answer (as in Word). The research I've done, unfortunately, seems to indicate that this isn't possible.
Please could you let me know the C# equivalent of:
// Set up access to secondary data source.
var domVehicles = XDocument.GetDOM("Vehicles");
// Source nodes.
var oVehicles = domVehicles.selectNodes("/Vehicles/Vehicle"); // ALL ROWS
// Get the node list.
var oRows = XDocument.DOM.selectNodes("/my:myFields/my:Document/my:Page/my:Table/my:Row");
// Save a sample node from this list for later - we will have to clone
// it to add our rows back in.
var oSampleRow = oRows.nextNode();
// Remove all the rows from all the repeating tables.
oRows.removeAll();
// ALL TABLES
var oTables = XDocument.DOM.selectNodes("/my:myFields/my:Document/my:Page/my:Table");
var oSampleTable = oTables.nextNode();
oTables.removeAll();
I'll then try and continue to follow Matt's example.
Thank you,
J