Results 1 to 2 of 2

Thread: Setting Datasource to XML doesn't work

  1. #1

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401

    Resolved Setting Datasource to XML doesn't work

    I've created a Crystal Report over a blank XML file. Then when I use following lines to set the DataSource to a populate XML data file, the report still comes out blank.

    Can anyone help me please?

    Code:
                Dim rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument
                rpt = New CCRpt1002
                rpt.SetDataSource(cXMLPopulatedFileName)
    Last edited by stingrae; Apr 2nd, 2006 at 06:32 PM. Reason: resolved
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  2. #2

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401

    Re: Setting Datasource to XML doesn't work

    Found the answer.

    just for future reference, you need to create a dataset from the XML first.

    Code:
    Dim myDataset As New DataSet
    myDataset.ReadXml(cXMLPopulatedFileName)
    rpt.SetDataSource(myDataset)
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width