Click here to Skip to main content
15,887,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi goodmorning


i am using ,net 2.0, and i have created many rpt files ,how can we call them with only one crystalreport viewer control.

pls suggest me

thanks
venkatesh
Posted
Updated 17-Dec-09 18:58pm
v2

.NET 2.0 is a platform. Are you using ASP.NET ? Are you using C# or VB.NET ? Why are you having issues ? Surely you can point the control to whatever report you want ?
 
Share this answer
 
Here is how I do it. I have a form with one crystal report viewer control, and then one unbound report document control. To switch to a different crystal report you have to set the .FileName, .SetDataSource, and if you have any parms on the report the .SetParameterValue for the ReportDocument control. Then bind it to the crystal report viewer with the .ReportSource property on the CrystalReportViewer control.

The .FileName needs to be the full path to the .rpt file (if you are doing this in a PC project, it might be located in a different location for your users than the developer machine. You'll have to determine how to point to it based on how you deploy your project).

Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900