A Dataset component that is NOT attached to a DB?
Posted on 2004-04-15
I am trying to use a Rave report on a set of data that is passed in to my application from a server: there is no database resident in the client application. The Rave report needs to run off a dataset, but the object that gets passed in is actually an array of created objects having parameters .Name, .Suburb, .State etc. (all strings). I then pull that apart to load it into a stringgrid for display, but I also need to be able to print it in Rave, which requires a Dataset.
I've tried to use a SimpleDataSet component, with data fields added independently, and then I tried to add data by:
tblPrintID.AsString := sgCompany.Cells[0,i+1];
tblPrintTradingName.AsString := sgCompany.Cells[1,i+1];
tblPrintSuburb.AsString := sgCompany.Cells[2,i+1];
tblPrintState.AsString := sgCompany.Cells[3,i+1];
tblPrintPostCode.AsString := sgCompany.Cells[4,i+1];
tblPrintContactNumber.AsString := sgCompany.Cells[5,i+1];
... but tblPrint (the SimpleDataSet) still seems to require attachment to a database and a table of some sort. I also tried a TTable but that involves including the BDE, which is not an option.
I guess what I really want is a 'virtual' table: something I can stack with data by code as above but without having to attach it to a real table or database. But it must be enough of a Dataset to appear in the pulldown list in the TRvDataSetConnection's Dataset property.