Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Non Database Data Source

Status
Not open for further replies.

AA2K5

Programmer
Apr 24, 2002
31
0
0
GB

I'm using Crystal Reports Developer 11 and I was wondering whether it is possible to use data that is not stored in a database to create a crystal report.

For example, say I am using ASP to communicate with an API using COM. The API accesses a database and retrieves data. This data is then passed back to the ASP pages using arrays and objects.

What I am now trying to do is use the data that I have retrieved to create a report.

I have read about Crystal Data Objects (CDO), is this what I need to achieve this?

Also is it possible to achieve this type of thing through the visual report designer or only through code?

I'm new to Crystal Reports so I'm not entirely sure whether this is possible. I'm also quite confused in terms of the Crystal products I need to achieve this (i.e. Crystal Reports, Crystal Enterprise etc.)

Thanks for your help

 
Hi,
Is there some reason you do not want to access the same database with CR as you do with the API call?

[profile]
 
I'm not entirely sure I'm answering your question but here goes .........

Basically, the data in the database is not relational.

There is a large chunk of logic which interprets the data held across several database tables to make it understandable. All this logic is held in API calls.

Therefore while I MAY be able to access the relevant information in the database directly through Crystal Reports, it would most probably mean duplication of business logic and a fair bit of work.

This is why I'm trying to use an alternative method to reuse the business logic in the API.

I hope that answers the question you asked.
 
HI,
Yes it does and while I might decide to use a SP to create the data for the report, in your situation I would look at using the RDC components to create the Crystal Report object
that can use the recordset created by your code as the report source..The Developer Help files have info on doing this.
[profile]



 
Thanks for the reply.

I'll have a look at RDC components in a little more depth.

When you say "use the recordset", are we still talking CDO recordsets or are you referring to some other type of recordset? I'm just trying to clarify that using CDO recordsets is the best way to achieve what I'm trying to do.

Something else that I wanted to ask about my situation was whether I should create the actual report outside the code and simply pass in a dataset. Or should I create the report in the code and use the dataset I have created to set the data for the report.

Thanks
 
Hi,
If I understand the RDC stuff correctly, you would create a CDO and use it as the report's data source..Any report created outside would not have access to a recordset created by code - it is not 'real' since it is not stored anywhere but memory..
You could, however, create or populate a database table with the recordset data and use that table as the report source.

[profile]
 
Thanks for your help.

I'll try using RDC and CDO to create a report.

I can then look forward to investigating the licensing issues of using an RDC generated report on multiple clients!!!

Thanks again for your quick and accurate help.
 
You don't actually say what development environemtt you intend to use.

If its a .NET platform you can also look at pushing a DataSet into the Report and fabricating the data in the middle tier API. But you will have to use ASPX, VB.NET or C#.

I am using this currently to prevent an application round-tripping to the database again to produce a letter to a customer that is already loaded into memory on the web server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top