467,864 Members | 1,911 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,864 developers. It's quick & easy.

Crystal reports question - expounded

Okay, after spending the past 4 1/2 hours trying to figure this out I am
getting some answers but I am also getting very frustrated. And again, if
this is the wrong forum to post to I apologize.

Why can I not use Crystal Reports to show data from a simple dataset?

The problem I have is that when the report tries to access the data, I get a
database login screen. It was suggested I use ODBC instead of OleDB (as I
have been using - it is an Access db). I converted all connections,
adapters and the dataset to ODBC. I still am getting the database login.

I tried connecting the report to a view (query) in Access and lo and behold,
that does work. However, I do not want the user to have to actually open up
Access, change the parameters in the Access query and then go back and run
the report.

What I want this to do is have the report use a dataset that is filled by
one of three parameterized adapters (the adapter is selected using a select
case statement). Doesn't this sound simple enough?

Maybe I am missing a step somewhere?

Thanks for any help.

Brad
Nov 20 '05 #1
  • viewed: 1263
Share:
1 Reply
I feel you pain. :^)

http://support.businessobjects.com/c...tasets.pdf.asp

This how-to looks like it only for ASP.NET and Access database but it shows
some basics.

I just struggled through this myself last night.

Here is what I have found:

First you need to a typed dataset, an .XSD file. You can either make this
manually, by doing Add->Add New Item->Dataset Or if you already have a
dataset populated in code, add some code to write it to disk as an XSD file
(WriteXML method of dataset?). You use this as your schema definition when
designing the report.

Second, Add a new Crystal Report to project (for example CrystalReport1).

Now use that typed datset as the datasource when designing your Report.
When picking your datasouce, look under Project Data->ADO.NET Datasets. You
should see your just created XSD file (if you saved it to disk, don't forget
to inlcude it in project, show all files->Inlucde In Project)

Then use this code to display it:

Dim ds As DataSet ' or you Type Dataset class name here if you want

' fill your dataset

Dim oCrystalReport As New CrystalReport1
oCrystalReport.SetDataSource(ds)

ReportViewer.ReportSource = oCrystalReport
HTH,
Greg
"Brad Allison" <ba******@ukcdogs.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Okay, after spending the past 4 1/2 hours trying to figure this out I am
getting some answers but I am also getting very frustrated. And again, if
this is the wrong forum to post to I apologize.

Why can I not use Crystal Reports to show data from a simple dataset?

The problem I have is that when the report tries to access the data, I get a database login screen. It was suggested I use ODBC instead of OleDB (as I
have been using - it is an Access db). I converted all connections,
adapters and the dataset to ODBC. I still am getting the database login.

I tried connecting the report to a view (query) in Access and lo and behold, that does work. However, I do not want the user to have to actually open up Access, change the parameters in the Access query and then go back and run
the report.

What I want this to do is have the report use a dataset that is filled by
one of three parameterized adapters (the adapter is selected using a select case statement). Doesn't this sound simple enough?

Maybe I am missing a step somewhere?

Thanks for any help.

Brad

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Stephan | last post: by
3 posts views Thread by Gheaci Maschl | last post: by
7 posts views Thread by p | last post: by
reply views Thread by Robert Warnestam | last post: by
3 posts views Thread by Miro | last post: by
1 post views Thread by =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.