'Create a dataset using a stored procedure dsRepoDataSet = oReports.GetPOsWithNotesbByPOSP(lcPONum) 'Count how many records there are lnCount = dsRepoDataSet.Tables(0).Rows.Count If lnCount > 0 Then glTableReturn = True 'If we are designing a report set this true If glWriteXML Then 'Write XML file for report design CreateXMLFile("C:\Temp\POWithNotes.xml", dsRepoDataSet) End If End If 'Stop here 'Write a populated XML schema file Public Shared Sub CreateXMLFile(ByVal XmlFileName As String, _ ByVal XmlDataSet As DataSet) XmlDataSet.WriteXml(XmlFileName, XmlWriteMode.WriteSchema) End SubStart up the stand alone Crystal Reports. (My version is XI, Rel 2.)