using a dataset/datatable as input for a crystal report

B

Bernie Yaeger

I have written numerous crystal reports and connected them to sql tables and
stored procedures. But evidently you can bind a report to a
dataset/datatable as the datasource. Can anyone show me some simple code
that does this? Also, when I open cr 9, where would I go to assign a
dataset as its datasource?

Thanks for any help.

Bernie Yaeger
 
W

William Ryan eMVP

Bernie:

You can do two things. Create a new report and select Standard or whatever
type of report you want. Then, the next step in the wizard is to select
your database. Select More Data Sources. From there, expand the TreeView
Item with ADO.NET (XML). A new Window will pop up. You can specify a XML
file path (which you can use WriteXML for a Dataset before you create your
report and point to this or an existing XML File. IF you choose this,
you'll need to use a Dataset.WriteXML first so the report can read the
schema - from then on, you'll call DataSet.WriteXML to the same path before
showing the report so the data is refresed).

Or, you can use the "Use Visual Studio Data Class" option, and then the
Visual Studio Data Class Name textbox will be enabled. YOu can then enter
an existing Strongly Typed DataSet and bind to it.

That's pretty much it.

Let me know if you have any other questions.

Bill
 
G

Guest

Click on the link below to see a sample of what William has already said

http://www.businessobjects.com/products/dev_zone/net_walkthroughs.as

View the last article on "Reporting Off ADO.NET Datasets"

Suresh

----- Bernie Yaeger wrote: ----

I have written numerous crystal reports and connected them to sql tables an
stored procedures. But evidently you can bind a report to
dataset/datatable as the datasource. Can anyone show me some simple cod
that does this? Also, when I open cr 9, where would I go to assign
dataset as its datasource

Thanks for any help

Bernie Yaege
 
C

Cor

Hi Bernie,

Please crosspost this kind of messages if it is in
framework.adonet
languages.vb

I am sure that the regulars from those newsgroups only apriciate that.

:)

Cor
 
B

Bernie Yaeger

Hi Bill,

Thanks, as always. I'll probably opt for the writexml approach, as most of
the time I do not strongly type datasets. But the writexml approach is
perfect for my needs.

Tx again,

Bernie
 
W

William Ryan eMVP

That's what I opt for most of the time b/c you can use a dataset you create
on the fly (as long as the columns are mapped). Glad to be of help.
 

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