I've had a rotten day. Just rotten. The kind that makes you want to curl up on the couch for a week, doing nothing but eating ice cream and watching old movies. Except that we just started a diet and don't have a TV in the living room.
My trial today was Crystal Reports with Visual Studio .NET 2002. I have a bunch of reports and a handy little application that pass two file names (the Crystal report and an XML data set) and have it pop up a preview window. It does basically what I want and works pretty well. But only on my machine.
No matter what I try, I can't get it to work anyplace else. I've gone through the documentation and tried every suggestion that was even remotely applicable, and it still doesn't work.
My initial problem was with the CR registration. That was easily fixed by adding the regwiz.msm merge module to my setup project and setting my registration code in the properties. Rebuild and reinstall the setup package. Problem one down.
After that, I discovered that I needed a few other merge modules. The full list is managed.msm, database_access.msm, database_access_enu.msm, and regwiz.msm. OK, fair enough. So I add those, rebuild my setup project, and reinstall. Problem two down.
At this point, the good news is that I'm no longer getting weird DLL exceptions. The bad news is that now I'm getting nebulous "Query engine error" messages when I try to set the report viewer's reportsource.
This is really bad, because my research leads me to believe that there are just about a bazillion different causes for this error. I tried every remotely applicable solution I could find, but so far nothing is working. I've double checked that msvcr70.dll and msvcp70.dll are present, that crqe.dll is registered, and I've even tried reinstalling the entire .NET 1.0 runtime, which is supposed to be included with XP in the first place.
On top of that, I tried changing my reports and my code. I read a suggestion somewhere that reports using data sets with multiple unlinked tables can cause problems, so I changed the report to use a single table. That didn't work, so I changed the data set to contain only a single table. That didn't work either, so confirmed that the data set schema matched the one used to create the report.
At this point, I have now created a minimal report viewer application as a test. I grabbed my single-table XML file and stuck it on a network drive. Then I used the report expert (what a crappy name) to create a simple report using that file as the data source. Last, I created a simple one-form application with a report viewer control. It just loads the XML file into a data set, creates a report document and loads it with the simple report, sets the data source, and then sets the report document as the viewer's report source.
The result? It still doesn't work, even with all the complications removed. On the up side, this seems to confirm my suspicion that there is some kind of runtime dependency that I'm missing. On the down side, I have no idea what it could be....
You can reply to this entry by leaving a comment below. You can send TrackBack pings to this URL. This entry accepts Pingbacks from other blogs.You can follow comments on this entry by subscribing to the RSS feed.