469,356 Members | 2,203 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Does crystal reports always needs a database ?

Hi all,

I'm new to this whole thing. I have a bunch of text files that are created
by a software at work that keeps info one of our products. Each unit being
calibrated gets a "record" (track by serial number) which is a text file
with data. The data is almost all the same format. There is header info
about the customer, then some more specs about the product then between 5 to
14 rows of calibration data.

The software that controls the whole thing is ancient. I don't want to touch
it. It writes this text file to the network for every unit that ships out. I
need to look at the files whenever I need to. I was hoping to have a windows
form to open the text file and somehow have the report template in a crystal
report file. The windows form coud display the data and print it if required
but it looks like I need to have the data in a database... which I do not.

Is this even possible ?
Thanks in advance.
Apr 23 '07 #1
4 1611
"Rodo" <ds*****@yahoo.comwrote in message
news:syXWh.1049$nR1.209@trnddc06...
>[...] I was hoping to have a windows form to open the text file and somehow
have the report template in a crystal report file. The windows form coud
display the data and print it if required but it looks like I need to have
the data in a database... which I do not.
Crystal Reports can take the data from inside a DataSet that you provide
via the SetDataSource method of the ReportDocument. You can build the
dataset in memory with your own code, without using a database at all.

Apr 23 '07 #2
On Apr 23, 10:33 am, "Rodo" <dsp1...@yahoo.comwrote:
Hi all,

I'm new to this whole thing. I have a bunch of text files that are created
by a software at work that keeps info one of our products. Each unit being
calibrated gets a "record" (track by serial number) which is a text file
with data. The data is almost all the same format. There is header info
about the customer, then some more specs about the product then between 5 to
14 rows of calibration data.

The software that controls the whole thing is ancient. I don't want to touch
it. It writes this text file to the network for every unit that ships out. I
need to look at the files whenever I need to. I was hoping to have a windows
form to open the text file and somehow have the report template in a crystal
report file. The windows form coud display the data and print it if required
but it looks like I need to have the data in a database... which I do not.

Is this even possible ?

Thanks in advance.
Hi!

Use you own custom code to populate a dataset and then pass it to
Crystal Reports ReportDocument Object using SetDataSource Method.

The easiest way is to Design your DataSet using DataSet Designer. Then
Create Your Report using Crystal Reports and specify the Data Source
for the report as ADO.net DataSet.

Then at runtime Populate that Data Set with Data using your custom
code and then pass it on the Crystal Report using SetDataSource
Method.

If you need any further info fee free to contact me

Bye
Manu Singhal
MCP
ma********@gmail.com

Apr 23 '07 #3


I would recommend going ALL your CRs using a dataset.

CR is basically a "presentation layer", and if you seperate your code to
create a datasource (dataset) from the presentation layer, you will find
maintenance much easier.

CR talking directly to your db is "rapid development", which isn't always
"the best development".

You will also have the ability to switch to another report tool (Active
Reports?) in the future if you go with the DataSet model.


"Rodo" <ds*****@yahoo.comwrote in message
news:syXWh.1049$nR1.209@trnddc06...
Hi all,

I'm new to this whole thing. I have a bunch of text files that are created
by a software at work that keeps info one of our products. Each unit being
calibrated gets a "record" (track by serial number) which is a text file
with data. The data is almost all the same format. There is header info
about the customer, then some more specs about the product then between 5
to
14 rows of calibration data.

The software that controls the whole thing is ancient. I don't want to
touch
it. It writes this text file to the network for every unit that ships out.
I
need to look at the files whenever I need to. I was hoping to have a
windows
form to open the text file and somehow have the report template in a
crystal
report file. The windows form coud display the data and print it if
required
but it looks like I need to have the data in a database... which I do not.

Is this even possible ?
Thanks in advance.


Apr 23 '07 #4
On Apr 22, 10:33 pm, "Rodo" <dsp1...@yahoo.comwrote:
Hi all,

I'm new to this whole thing. I have a bunch of text files that are created
by a software at work that keeps info one of our products. Each unit being
calibrated gets a "record" (track by serial number) which is a text file
with data. The data is almost all the same format. There is header info
about the customer, then some more specs about the product then between 5 to
14 rows of calibration data.

The software that controls the whole thing is ancient. I don't want to touch
it. It writes this text file to the network for every unit that ships out. I
need to look at the files whenever I need to. I was hoping to have a windows
form to open the text file and somehow have the report template in a crystal
report file. The windows form coud display the data and print it if required
but it looks like I need to have the data in a database... which I do not.
I'll echo what the others have said here: you can put the data into a
DataSet and pass it to Crystal. We do that here exclusively. (Note
that Crystal has some quirks when designing from an ADO.NET data
set... some bits of the Crystal Reports Designer that deal with this
are buggy and have been for several versions. It's not a show-stopper,
just annoying.)

That said, you may want to do yourself a favour and put the data in a
database anyway, just because it will be so much more accessible for
other purposes. Whether you then decide to use Crystal to pull from
the database directly, or still feed it via a DataSet in your program,
well that's up to you.

You can write Windows services in C#, and C# has a FileSystemWatcher
class that will alert you when new files are created in a directory.
Even if you have multiple directories, you could write a small Windows
service that monitors them all and, when a new file is created by your
ancient application, parses the file and puts the information into a
database in whatever format you choose. You could then write all new
software to read the database. There would be only a short delay
between the file being created and the database being updated (a delay
that you could determine and tune in your application).

I believe that you could even cope with files being updated and, with
some cleverness, files being deleted, although I don't know whether
your ancient application does these things.

All of this doesn't necessarily help you with your reporting issue.
It's more of a springboard for later development, all without touching
the legacy app, as you said.

Apr 23 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Chris Neal | last post: by
4 posts views Thread by Ryan Gregg | last post: by
9 posts views Thread by Altman | last post: by
2 posts views Thread by =?Utf-8?B?Um9zcyBNYXNvbg==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.