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!

Crystal Report Viewer

Status
Not open for further replies.

TJunior

IS-IT--Management
Jan 18, 2002
33
DE
Hello There,

I am attempting to open crystal reports on the web. I have most of the site working but when I attempt to have the Crystal Report Viewer load a document using text in a textbox it throws a file load exception.

If use: doc.Load(@"C:\reportname.rpt");

it works,
but if I use: doc.Load(@"" + textbox1 + "");

It throws an exception.

*textbox1 has the full path e.g. C:\reportname.rpt

Does anyone have any ideas???

Thanks

 
Why do you have null strings on both sides? why not just doc.Load(@textbox1)?
 
Use :
Code:
doc.Load(textbox1.Text);
and make sure you use \\ instead of one.
obislavu
 
how did i miss that?! And I use textboxes all the time!!
 
Thanks obislavu! This did the trick.

I thought I tried this already, but obviously not.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top