
VB6 Report Datasource Dialogue Weirdness
Hello
We've got a few screens in our current project that we'd like to output to
h/copy and, since they are basically displaying a tabulated set of data we
thought we'd use the vanilla reporting functionality that comes with VB to
do this.
That's all worked fine, we've defined a data-environment and the various
commands for the different types of reports (there's four or five of them
that we're doing), dropped report controls onto the relevant forms and off
we go....
But, and there's always a but I guess, the very first time we reference the
report definitions for any of these screens we get a 'Select Data Source'
dialogue that provides us with a variety of DB provider (.dsn extension)
files in a files selection list box that is pointing at C:\Program
Files\Common Files\Odbc\Datasources.
Cancelling this dialogue (or indeed picking one of the offered files and
OKing it) has no effect on the report preview screen that gets shown, the
h/copy produced is fine and it only occurs the first time a report
definition (*any* report definition) is referenced in any particular
execution of the code. But still... its annoying the hell out of me and I
can't really spare the developer time to track down a problem that doesn't
directly impact our delivered functionality so I thought I'd try and use the
planetary brain to crack it.
All of the report definitions have been set up with datasources and commands
at design time so the appearance of this dialogue was a bit of a suprise to
us. Interestingly however if you delete the datasource from the report
designer you don't get the 'select data source' dialogue (which you might
expect to happen given that the report doesn't have one) - just an error
message and an empty preview screen.
The project is using vanilla VB6 code (no 3rd party OCXs or anything)
running ADOs against an Access97 database. Developing on NT machines for
target platforms that are NT or Win98.
What gives?
Luke