Crystal report shows up empty

  • Thread starter Thread starter Dentharg
  • Start date Start date
D

Dentharg

Hi!

I've created an C# project, added DataSet and created a table adaptor
(WorkerClothesReport).

I've created several GetData() functions and can preview their output.

Next, I've created a Crystal report with WorkerClothes as data input.

In my main window I've added report viewer and initialized it with

WorkerClothesReport rptWorkerClothes = new WorkerClothesReport();
reportViewer.ReportSource = rptWorkerClothes;

in MainWindow_Load() - where MainWindow is a .. main windows of app.

The report comes out empty! Even tho I can preview data by any GetData()
function.

Please assist!

Thank you,
-Marcin
 
Hi,

WorkerClothesReport is the report right?
Where are you filling it with data?

From your post the data comes from a dataset, if so you use
WorkerClothesReport.SetDataSource ( your_dataset)
 
Ignacio said:
Hi,

WorkerClothesReport is the report right?
Where are you filling it with data?
Right. I have DataSetReports to talk to a database.
From your post the data comes from a dataset, if so you use
WorkerClothesReport.SetDataSource ( your_dataset)

So now I have

WorkerClothesReport rptWorkerClothes = new WorkerClothesReport();
rptWorkerClothes.SetDataSource(new DataSetReports());
reportViewer.ReportSource = rptWorkerClothes;

Still empty. What I am doing wrong?

DataSetReport contains a table adapter called WorkerClothes. It has some
fields and some Fill,GetData() functions.

Thank you,
-Marcin
 
Still empty. What I am doing wrong?
DataSetReport contains a table adapter called WorkerClothes. It has some
fields and some Fill,GetData() functions.

The WorkerClothesReport has been created using
DataSetReports.WorkerClothes project data with help of a wizard.

Thanks,
-Marcin
 
Back
Top