Hi Folks
I use the following to save my heirarchical recordset as XML.
Dim db2 As New adodb.Connection
Dim palletconnstring As String
Set adoRSForXML = New Recordset
palletconnstring = "PROVIDER=MSDataShape;Data PROVIDER=MSDASQL;dsn=mltest;uid=;pwd=;"
db2.Open palletconnstring
adoRSForXML.Open "SHAPE {select palletid,tla,rev,datecreated,MovedToFG,MovedToHUB,HubNAME,Shipped from PalletDetails2 where palletid = '" & Trim(adoPrimaryRS!palletid) & "' Order by palletid} AS ParentCMD APPEND ({select serialno,palletid from Serialno2 Order by serialno } AS ChildCMD RELATE palletid TO palletid) AS ChildCMD", db2, adOpenStatic, adLockOptimistic
I get the attached XML file. I want to be able to create an HTML report at run time using an XSL script.
How do I associate and XSL file with it at run time?
Do I have to add any reference to the XSL file inside the XML file?
I created an application which among other things created a data report based on the data environment. Now Im told the application will be used elsewhere. Using the Data Environment means the connection string is built into the App. No Good!. So all I want is to print a simple HTML report on one page showing the pallet information and then the serial numbers that are on it.
(1) I convert the SHAPE recordset into XML.
(2) I include the xsl file reference in the XML file.
(3) Oh **** how do I create a XSL file for a heirarchical recordset.
I know you showed me how to extract the childcmd but I couldnt get it to work. Could you show me the XSL code to write out the parent pallet info then a list of the serialno children.