Crystal Reports Newbie Question

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I'm trying to ramp up on Crystal Reports to do a report in my asp.net app.
In all of my aspx pages, I connect my data adapters to my database via a
connection string in web.cfg.

When I try to connect a RPT to a database all it shows are datasets exsiting
in my project and says I have no connection. How can I connect a RPT to my
database? Can I create a Data Adapter to feed Crystal Reports?

Thanks,
G
 
I'm trying to ramp up on Crystal Reports to do a report in my asp.net app.
In all of my aspx pages, I connect my data adapters to my database via a
connection string in web.cfg.

When I try to connect a RPT to a database all it shows are datasets exsiting
in my project and says I have no connection. How can I connect a RPT to my
database? Can I create a Data Adapter to feed Crystal Reports?

Thanks,
G

What I do is to create a "dataset" - Use Add/New Item and select
DataSet - that connects to the stored procedure that I am going to use
to generate the report from and use that to build the report from.
Just use the Server Explorer to find the stored procedure and drag it
to the dataset screen. It builds a nice XML file that is used in CR
for it to determine what data will be available at runtime. Then, I
programatically bind the stored procedure result to the report at
runtime and it comes out fine. Also, you do not need to rebuild the
report or anything even if you use another data source to generate the
report with. As long as the "signature" (fields that are generated
that are used to build the report) is the same, it works fine.
 
Hmmm. I have always generated Data Adapters and then created a dataset from
those. I have never done it that way. Sounds like the way to go though.
Thanks
Gary
 
Back
Top