a simple crystal reports app

V

Victor Paraschiv

Hi,
I want to make a simple Crystal Report with data extracted from sql
server 2005. I use C# in VS2005.
In the windowform I use a CrystalReportsViewer and I add a new CR to the
project....design my report( add the fields from table to the
DETAILS section) , and in the end, after I run the application the
report displayed is a blank page. If I use the same dataset as a
datasource for the datagridview, I get all the information from the DB.
For the exemple I use a trivial table with 3 columns
(ID, NAME, AGE) and 4 rows containing userful data. The dataset which I
use is built through a BindingSource.

What is wrong with this project? What am I missing? Any clue?

Thanks
Victor Paraschiv
 
M

Morgan Fears

You need to set the report datasource before viewing the report.
Ex:
DataSet ds = MYDataSet;
MyReport.SetDataSource(ds);
 
V

Victor Paraschiv

I followed your instructions and I got the things done. Thanks a lot.
The problem was that I used a class as datasource for my report...
without instantiating any object. Where was my head....

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top