Dynamically changing TfrDBDataSet's dataset proper

OK, I have a multi-purpose routine that accepts a passed in Dataset and I need to create a report from this dataset. What order should I do things? I've tried this:


frDBDataSet->DataSet = pDS;
frDBDataSet->Init();

if ( LoadReport( sReportName, frReport ))
{
frDBDataSet->RangeBegin = (bCurRow) ? rbCurrent : rbFirst;
frDBDataSet->RangeEnd = (bCurRow) ? reCurrent : reLast;
frDBDataSet->OpenDataSource = false; // tis already open

frReport->ShowPrintDialog = false;
frReport->ShowProgress = false;

if ( frReport->PrepareReport() )
bRet = ExportToStream( frReport, pMemStr, cFormat );
}

but when OnGetValue is called, the dataset doesn't appear to point to a valid record - probably at EOF ???

Anyone?

TIA

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.