Guys i am working on a little project using C# & Ms Access, where i need to print some reports,there are few things i need to ask:-
1) is there any way to print reports other than Crystal Reports
2) i tried using crystal reports all things are kind of working fine, during the debugging i am getting the desired reports, but the setup of same thing is giving Database Login error.i Tried things as on Google but failed.I hope u got my problem Please let
me know how can i resolve the issue. Waiting for a response
Ya it is asking for Crystal Reports Login, i tried putting the login details in the .cs file but still the same. Once i also got the Temp File Error. Plz help me through
Thanks for the code Rajan but , it is giving me error on Debugging at "CrReportConnect(doc, crConnectionInfo);" . and where i have to place the <add key> code. If you have any sample application which uses this code, plz mail me.That will help me palcing
the code in my application.
circut009
Member
43 Points
86 Posts
Error During Crystal Reports Printing
Jan 10, 2012 11:09 AM|LINK
Hello,
Guys i am working on a little project using C# & Ms Access, where i need to print some reports,there are few things i need to ask:-
1) is there any way to print reports other than Crystal Reports
2) i tried using crystal reports all things are kind of working fine, during the debugging i am getting the desired reports, but the setup of same thing is giving Database Login error.i Tried things as on Google but failed.I hope u got my problem Please let me know how can i resolve the issue. Waiting for a response
Thanks in anticipation
rajanireddy
Member
362 Points
161 Posts
Re: Error During Crystal Reports Printing
Jan 16, 2012 08:39 AM|LINK
Is that asking you to login again?
circut009
Member
43 Points
86 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 03:59 AM|LINK
Ya it is asking for Crystal Reports Login, i tried putting the login details in the .cs file but still the same. Once i also got the Temp File Error. Plz help me through
rajanireddy
Member
362 Points
161 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 04:40 AM|LINK
ReportDocument doc = new ReportDocument();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
CrReportConnect(doc, crConnectionInfo);
___________________________________
private
void CrReportConnect(ReportDocument Rpt, ConnectionInfoConnInfo)
{
ConnectionInfo with_2 = ConnInfo;
with_2.ServerName =
ConfigurationManager.AppSettings["server"];
with_2.DatabaseName =
ConfigurationManager.AppSettings["DataBase"];
with_2.UserID =
ConfigurationManager.AppSettings["username"];
with_2.Password =
ConfigurationManager.AppSettings["Password"];
Tables crTables;
TableLogOnInfo crTableLogOnInfo;
crTables = Rpt.Database.Tables;
//Set the logon information for each table.
foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
{
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = ConnInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
}
_____________________________________________________
<add key="CrystalImageCleaner-AutoStart" value="true"/>
<add key="CrystalImageCleaner-Sleep" value="60000"/>
<add key="CrystalImageCleaner-Age" value="120000"/>
<add key="Connection" value="server=dms;database=demotrrr;uid=sa;pwd=pwd;pooling=false"/>
<add key="server" value="rohith"/>
<add key="DataBase" value="Demo"/>
<add key="username" value="sa"/>
<add key="Password" value="pwd"/>
rajanireddy
Member
362 Points
161 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 04:41 AM|LINK
Try the above code. It will work
rajanireddy
Member
362 Points
161 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 05:50 AM|LINK
Go through the following link.
http://beta-forums-asp.neudesic.com/t/1026635.aspx/1?The+report+you+requested+requires+further+information
circut009
Member
43 Points
86 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 05:51 AM|LINK
Thanks for the code Rajan but , it is giving me error on Debugging at "CrReportConnect(doc, crConnectionInfo);" . and where i have to place the <add key> code. If you have any sample application which uses this code, plz mail me.That will help me palcing the code in my application.
Thanks in advance.
rajanireddy
Member
362 Points
161 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 05:53 AM|LINK
Place <add>---- in web.config file.
Place it in <appSettings> section.
What error are you getting exactly?
circut009
Member
43 Points
86 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 05:57 AM|LINK
Dude i am working on a windows application, i dont thing the same(web) code will work in windows application.
rajanireddy
Member
362 Points
161 Posts
Re: Error During Crystal Reports Printing
Jan 17, 2012 06:15 AM|LINK
Ok,
What error are you getting?
And send the code.