Hai,
Iam using Crystal reports having subreports in that When i make a setup of the application and run on the other system Iam getting a dialogbox asking for loginname and password for the database though I have not kept aything....It seems the database path is getting hard coded....
A normal plain report is working fine....
Please help me where the problem is....
Thank you.
Regards,
PadmaKiran

Crystal Reports
C#
ReportDocument object has a method named Logon which takes two argument, one is user name and other is password. you can set those values in your application and you won`t get that message.
Regards,
Jim Kiser
Thank you very much for the reply.
But,I could not found Logon uder Report Document..
Can U suggest me with a small sample application.
regards,
Kiran.
kevinj_j
Hello,
I could not solve the problem.Can u plz send me a small sample code.
Iam completely new to CR.
Thank you very much.
regards,
kiran.
stripendulous
Here i place a sample code for you, i hope it works. if it is not, i can make a sample application and send for you. but first try this one.
// Get a ReportDocument reference from your ReportCache
// Component
ReportDocument reportdocument = this.cachedReport.CreateReport();
// Set the report Viewer reference to your report Document
this.crystalreportviewer.ReportSource = reportdocument;
// Here is Method for Log on. Remember that i have stored
// LogonID and
//Password in config file
reportdocument.SetDatabaseLogon(System.Configuration.ConfigurationSettings.AppSettings["ReportsLogOn"],System.Configuration.ConfigurationSettings.AppSettings["ReportsPassword"]);
// Refresh Report
rd.Refresh ();
abhishekh26
I would suggest looking at the following Knowledge base article:
http://support.businessobjects.com/library/kbase/articles/c2011464.asp
Tyler Whitney
Hai ,
Thank you very much for your help...It really helped me a lot....
Finally I could solve my problem.....
Thanks again..
Kiran
hawkpie
Hello,
My problem is :
I have an application in C# using crystal reports in that.
I have two kinds of reports one with subreports in the main report and other is a plain report(with out any subreports in that).
I made a SETUP project of this application,,and installed in other system.
The Plain report is working fine ,But the one with subreports is showing a dialog box asking for LoginID and password.
The ServerName and Database name in the Error Dialog is harcoded with the default path name of the database (i.e the database path in my system).
Can you let me know where actually Iam doing the mistake
Can U explain me with a sample application.
Thank you very much.
regards,
Kiran
ayou
Hello,
Thank you very much for the reply..i will try this and inform the result..
Thanx again.
regards.
Kiran
George Petrehus
Can you tell me what kind of error Or result you are getting
actually Sample Code is just like i sent to you in last post. Every ReportViewer Document has a Source. Source can be a ReportDocument. this reportDocument has a reference to memory-resident Report and you can easily Export it to other formats too.
Tell me the kind of error your are getting. Also an additional solution for you is to call ExportTo() method of this reportDocument. after than you can just Redirect page to that PDF file and you will get same result :P.
Let me know if you need other helps.
Regards,
Mathew Clark
Hello,
Thank you very much for the reply...I have made the same as per the code to my subreports also....But Unfortunate again I am facing with the same old problem......
I couldnot understand wher iam going wrong,,,i debugged my code carefully...
can u plz send me a sample application....
thank you.....I need this very seriously....Plz....
regards,
Kiran