Click here to Skip to main content
16,019,614 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
If I don't know the database used in the crystal report and I want to access it in C# code then how will I get to know the database source and credentials ?
I am not able to run the report without the database name, password etc. as it is throwing an error database not matched.
Posted
Updated 18-Mar-12 20:52pm
v2

write this line in your code before display a crystal report

C#
reportViewer.EnableDatabaseLogonPrompt = false;


reportViewer is the name for your report Viewer object
 
Share this answer
 
v3
Comments
Developer.Code 19-Mar-12 3:28am    
This is not helping.I have added a .rpt file in my code now want to display the same.
In fact it is saying table is not found, which is used in crystal report.
jineshlalan 12-Jul-12 1:41am    
Thanks Works Completely Fine
See Pratik they have given here very basic steps to use crystal report with DB. Try this way :)

http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-stepbystep.htm[^]
 
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