PC Review


Reply
Thread Tools Rate Thread

Crystal reports question - expounded

 
 
Brad Allison
Guest
Posts: n/a
 
      8th Jul 2004
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


 
Reply With Quote
 
 
 
 
Greg Burns
Guest
Posts: n/a
 
      8th Jul 2004
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" <(E-Mail Removed)> wrote in message
news:%23wdV$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports Does Not Display BLOB Field Correctly in IBlobField Control Using Crystal Reports for VS.NET 2003 Jeff Microsoft Dot NET 0 4th May 2006 09:21 PM
Crystal Reports question (using VB) Brad Microsoft VB .NET 3 14th Jan 2005 03:34 PM
Crystal Reports Question =?Utf-8?B?U3VuaWwgU2FiaXI=?= Microsoft ASP .NET 3 26th May 2004 02:16 PM
Crystal Reports newbie question: binding single .NET WinForm to different reports files at runtime? Michael Microsoft Dot NET 0 23rd Apr 2004 07:56 PM
Crystal Reports newbie question: binding single .NET WinForm to different reports files at runtime? Michael Microsoft Dot NET Framework Forms 0 23rd Apr 2004 07:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 AM.