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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOWTO Declare a crystal report in .NET 2005 just like in .NET 2003

Status
Not open for further replies.

ganjafarmerIT

Programmer
Jun 29, 2004
30
0
0
NL
Hi folks, I just started using .NET 2005. I've been trying to use some old code(.NEt 2003) in .NET 2005, and it's giving me a headache

1. I can't declare a crystal report just like in .NET 2003.

2. I'm trying to export my crystal report to pdf trough a memory stream. This is one of the most common used solutions.
I used my old code from .NET 2003 to do this, and it should work, but when I run the code, Adobe Acrobat generates an error saying the document is corrupted.
If I export to http response, it works fine:S.

3. I'm having problems with positioning my controls on my web form. I can't seem to position a control where I want it on my webform just like in windowsforms.

Thanks in advance
 
1.) Not sure what you mean by this. Just drop the CRViewer on the page. In the page load try this:
Code:
CrystalReportSource1.ReportDocument.DataSourceConnections.Item(0).SetConnection("<Server>", "<DataBase>", False)

CrystalReportSource1.ReportDocument.DataSourceConnections.Item(0).SetLogon("UserName", "PW")

2.) Haven't tried this yet. Look on businessobjects.com for help.

3.) In ASP.NET the controls are layed out using flow layout by default. To use change the layout, click an object, click Layout-->Positionon the menu, and change the layout as you want.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top