IN .Net, I'm using a strongly typed dataset as the datasource for the report. When the dataset is attached to the report, I will get an error saying "Unkown Query Engine Error." Though when I pull the dataset from the report and then try to print it will succssfully print the text fields that are on the report. I'm using the PrintToPrinter method of the CrystalReports namespace, I'm printing straight to the printer wihtout previewing it, not specifing a printername, and my dataset is rather large. Here is my code:



private void btnPrint_Click(object sender, System.EventArgs e)
{
try
{
DataSet dsPO = new DataSet();
DataTable dtPO = new DataTable("PurchaseOrder");
DataRow drCurrentRow = ((DataRowView)this.BindingContext[m_dsPurchaseOrder,m_dsPurchaseOrder.PurchaseOrder.TableName].Current).Row;

dtPO.ImportRow(drCurrentRow);
dsPO.Tables.Add(dtPO);

if ((dsPO.Tables.Count <= 0) || (dsPO.Tables[0].Rows.Count <= 0))
{
//NO DATA
MessageBox.Show("There is no data for this Report");
}
else
{
dsPO.Tables[0].TableName = m_dsPurchaseOrder.PurchaseOrder.TableName;

Reports.PO ReportPO = new Reports.PO();
ReportPO.SetDataSource(m_dsPurchaseOrder);
ReportPO.PrintToPrinter(1,false,0,0);
ReportPO.Dispose();
ShowStatus("Purchase Order printed successfully","Print Status");
}
}
catch(Exception ex)
{
ExceptionManager.Publish(ex);
MessageBox.Show(ex.Message ,"Exception Printing Purchase Order");
}
}

I'm sure it has to do with the dataSet, so any suggestions with that or my code will be helpfull.