Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetDataSource problem

Status
Not open for further replies.

rabbit75

Programmer
Aug 15, 2002
30
I am trying to use the CrystalReportViewer ActiveX. Currently have Crystal 9.2 installed.

An error that reads

An unhandled exception of type
'System.Reflection.TargetInvocationException' occured in mscorlib.dll.

Additional information: Exception has been thrown by the target of an invocation.

occurs on line of code:
Code:
rpt.SetDataSource(myDS.Tables(0))

Can someone point me in the right direction of where to look to solve this?

Thanks,
rabbit75
 
The first thing I always try with Crystal is applying their recent HotFixes.

Other than that, what is your report based off of? An XML schema?
 

The report is based off the table data, using the myDS dataset.

rabbit75
 
FYI....

The weekly hotfixes are suspect. I just installed one to fix the papersource bug and now I've lost functionality in my application in multiple places. Be carefull when installing them.

I'm corresponding with support now to fix the "hot fixes".





Scott
Programmer Analyst
<{{><
 
I hear you there Scott. Sometimes they do help a lot, however. I remember there being a problem once where the if you chose not to separate pages in WebForms, if the report was long enough, it would produce an error with a message that seemed to have nothing to do with the problem. A hotfix cured that.

Rabbit,
If you problme is related to something else, I am not sure what to tell you. Historically, if I have ran reports not bound to a database, I would use a report based off of a .TTX file and pass in a recordset for VB6. In .Net, I would base the report off an XML schema and pass in a dataset.

Also, if you really are using the Active X viewer rather than the managed viewer, maybe that is your problem.
 
RiverGuy, stinkyminky

Thanks for the input.

rabbit75
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top