Click to See Complete Forum and Search --> : Don't print the dataset field


lutzs
February 13th, 2003, 03:05 AM
Hi,

I add a field of my dataset in the crystal report (.net application).
When I click a button I print this report.
But the dataset field isn't printed at my report!

For control, I get out the field with a MessageBox.Show and the value is correct.

I'm passing a DataTable to a Crystal Report (C#):

header crReportDocument = new header();

// the DataSet
programmname ds_pname = new programmname();
DataTable t_pname = new DataTable();

DataColumn myDataColumn = new DataColumn();
myDataColumn.ColumnName = "name";
myDataColumn.DefaultValue = Application.ProductName;

t_pname.Columns.Add(myDataColumn);

// add table to the dataset
ds_pname.Tables.Add(t_pname);

// add datatable to CrystalReport
crReportDocument.SetDataSource(t_pname);

crReportDocument.PrintToPrinter(1, true, 1, 1);
...



What is the problem?
I work with MS Visual Studio.net and Crystal Reports 9.0.

Thanks, Stephanie