Chapter 13 showed you how to connect to data sources using the Visual Studio IDE. This consisted of using the report wizards to select the data source, specify the fields to print, and work with SQL statements. This chapter focuses on showing you how to log on to secure data sources and change the data source of an existing report during runtime. Using the Crystal Reports object model during runtime gives you more power than working solely with the Visual Studio IDE.
Connecting to databases during runtime gives a reporting solution great flexibility for using a single report to print with different data sources and dynamic queries. Reports can dynamically print data from different servers, different types of databases, and create customized queries.
To be honest, this chapter starts out pretty easy, but then it gets challenging after that. There are many variations for performing data connectivity and it can be overwhelming at first. It’s best to read through the headings in this chapter to find the area that applies to your situation. Each solution is independent of the others. Most of the code can be used with any report without modifications.