Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Re: Changing a Crystal Report datasource (access) at runtime in C#

$
0
0

Hi Paul,

 

Just add all of these assemblies to your project and it will work EXCEPT, CR does not support access to accdb files EXCEPT through ODBC, so you have no choice but to use ODBC.

 

MDAC is installed on every Windows PC so they will all have the drivers. All you need to do is either configure your installer to create a System DSN to your accdb file or use a File DSN and include it in your redist. Lots of ways around this.

 

You may even want to consider using MS SQL Express, it's a real SQL database and will not give data size limit issues later on....

 

using System.Reflection;

using System.Runtime.InteropServices;

using System;

using System.IO;

using System.Xml;

using System.Drawing;

using System.Drawing.Printing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data;

using System.Threading;

using System.Diagnostics;

using System.Globalization;

using ADODB;  

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

using CrystalDecisions.ReportAppServer;

using CrystalDecisions.ReportAppServer.ClientDoc;

using CrystalDecisions.ReportAppServer.Controllers;

using CrystalDecisions.ReportAppServer.ReportDefModel;

using CrystalDecisions.ReportAppServer.CommonControls;

using CrystalDecisions.ReportAppServer.CommLayer;

using CrystalDecisions.ReportAppServer.CommonObjectModel;

using CrystalDecisions.ReportAppServer.ObjectFactory;

using CrystalDecisions.ReportAppServer.Prompting;

using System.Data.OleDb;

using CrystalDecisions.ReportAppServer.DataSetConversion;

using CrystalDecisions.ReportAppServer.DataDefModel;

using CrystalDecisions.ReportSource;

using CrystalDecisions.Windows.Forms;

using CrystalDecisions.ReportAppServer.XmlSerialize;

using System.Timers;


Viewing all articles
Browse latest Browse all 8644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>