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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report for SQL-Server and Access DB

Status
Not open for further replies.

HowyD

Programmer
Nov 27, 2001
12
DE
Hello,

I writing an App with VB.Net using CR.Net.
The reports used by the App are designed connecting to the SQL-Server DB.
Now I want to view the reports either on an Access DB with the same schema as the SQL DB.

How can I do this through code?

Rgs
Howy
 
Could you link the SQL Server tables into access and then query the access database? It's not something I've done a lot of myself, but there is a link tables function in access.
 
Hello Tom,

This is not possible because the Access DB is standalone with no connection to the SQL-Server. You can think of it as a copy from the SQL-Server DB.

 
In Crystal, go to the Database menu and use "Set Location".

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
One thing to remeber that will limit the ability to easily make universally accepted reports as you are desiring is that the datasource the report is built against must not change structurally.

You could create a report of SQL - A and then point it to SQL - B at runtime provided the structure is identical. Data can be different, but the structure must match.

Access and SQL are 2 structurally different sources and porting the report may not be so easy. In the end, you may need 2 reports.

Typically in CR when you reset the location, you need to perform a 'Verify Database' to reset the indexes and allow the report to remap the fields in the report to the fields in the database.

You could try this in your code with the Database.Verify method. This should check for integrity and repair if it can. I have used this is the past with inconsistent results, but it might work for you.



Cheers,

SurfingGecko
Home of Crystal Ease
 
Hallo Ido,

I know about the "SetLoaction".

I also know about the COM-Methods for CR 8.5 to convert a DB-Driver.
But how to accomplish that all by VB.NET Code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top