Print Page | Close Window

Connectivity Query

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=920
Printed Date: 01 May 2024 at 8:44pm


Topic: Connectivity Query
Posted By: madhu820
Subject: Connectivity Query
Date Posted: 25 Jun 2007 at 7:02am
Hi all,
 
I am new to crystal reports. Recently I have been working on .Net 2003. Now I have to generate some of the reports,charts using Crystal reports. Previously I have used Manco Charts and other stuff to generate reports But now I have to switch to crstal reports.
 
For security reasons, My application requires that crystal reports should not be connected directly to the database. Instead is there any possibilty that crystal reports can create some adaptors, which can run the protocol which I am presently using to connect to database.
 
Otherwise can crystal reports generate graphs if we provide the data(which I already pooled from the database and stored in some variables)directly.
 
 
Thanks in advance



Replies:
Posted By: BrianBischof
Date Posted: 25 Jun 2007 at 10:48am
You can create and populate a DataSet object with VS.NET 2003 and use that as the datasource for your CR app. Be sure to save the DataSet's schema to a .XSD file and use that as the source for the report design. Whenever you modify the datasource structure, even in the most minute way, you have to generate a new .XSD and update CR with it. Otherwise you'll get Login errors.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: madhu820
Date Posted: 25 Jun 2007 at 9:17pm
Hi Sir,
 
I have tried. But I am not getting it. can you provide me an example so that I can use it. Thanks in advance.


Posted By: BrianBischof
Date Posted: 25 Jun 2007 at 11:11pm
Let me find my book....Here is the quick and dirty.

1) write the code to populate your dataset.
2) Add the ".WriteXMLSchema()" call so it saves the .XSD file
3) Comment out that line b/c you don't need it anymore unless you modify the sql query again in the future
4) Build a new report and use the XSD file as the data source.
5) Assign the dataset to the report by call ingReportDocument.SetDataSource(dataset)
6) assign your report to to the report viewer






-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window