Home All Groups Group Topic Archive Search About

Crystal Reports and Data Tables.

Author
19 Jul 2006 1:26 PM
Tull Clancey
Hi all.

I use Crystal a lot and have found it to be hard work in net 2005, maybe I'm
going about things in completely the wrong way, it wouldn't be the first
time!

I don't like using the data objects in vb.net so all database connections
and data retrieval are handled completely in code.  The problem I have is
that for complex reports where data is pulled from several database tables I
build a DataTable and pass this data to the report.  However, as it's all
code I have to first create a new table in the database to mimic the results
so I can create the report.

Is there are better way to achieve what I'm after?

Cheers,
Tull.

Author
19 Jul 2006 2:03 PM
Spam Catcher
"Tull Clancey" <tull.clan***@btopenworld.com> wrote in
news:afydna7HZ7GKriPZnZ2dnUVZ8qednZ2d@bt.com:

> I don't like using the data objects in vb.net so all database
> connections and data retrieval are handled completely in code.  The
> problem I have is that for complex reports where data is pulled from
> several database tables I build a DataTable and pass this data to the
> report.  However, as it's all code I have to first create a new table
> in the database to mimic the results so I can create the report.
>
> Is there are better way to achieve what I'm after?

The proper way is to us CR's PUSH method - however there are still alot of
manual processes because you're using a disconnected dataset:

1. Create a .NET XML Dataset which mimics the datatable (or if you're
extremely lazy, just export the datatable to XML).

2. When creating the report, rather than attaching the report to the
database, attach it to the XML Dataset (file or compiled class).

More details here:

http://support.businessobjects.com/communityCS/TechnicalPapers/rtm_reportin
goffadonetdatasets.pdf.asp

http://www.codeproject.com/aspnet/crystal_report.asp