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.
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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.