Showing posts with label crystal. Show all posts
Showing posts with label crystal. Show all posts

Tuesday, March 20, 2012

:( Please Help Needed on Printing Report in RS

Hi All Experts,
I caught in a big problem, previosly our application was using Crystal
Report, but on my suggestion Project Manager changed the reporting tool
for next client and we are decided to use RS and removed CR from our
application.
There are 50 Reports, we designed it well and we dont find any
problems. But out of those reports, two reports are autoprint reports.
The scenario is, i want to print a report which accepts parameter
without user interaction (there might be any number of pages) at server
side (This is a Major Feature of our application). I used Printer
Deliver Sample, but it is time or data driven , but i want to do this
job through my code, means at certain line of code i have to print the
report. Also Delivery Extension uses static parameter, how do i change
it runtime? I also used RsClientprint but it shows printer dialog which
i dont want to show.
Please help me, all eyes in my team are looking towards me like i did a
wrong decision. I am very thankful to all if i receive the solution.
Thank You
Regards
Rajone thing i forgot, i want to print this report in Printed Stationary
with duplicate on same page, means i have to set right, left, top and
bottom margin, i used ReportRender Method, in which i converted report
into EMF and send the stream to printer but i am not able to set
margins, also i am not getting report print what i designed|||Raj,
The "Print a report from a console app" download from this site might
be of help to you. http://www.gotreportviewer.com/
Andy Pottersql

Sunday, March 11, 2012

.net version of crystal reports?

is there a .net version for crystal reports, if i do my reports in 8.5 and load them in a .net application. would it be a problem?
i would be happy if someone could clarify my confusion!
thanksYes there is a .Net version that is supplied with MS Visual Studio .Net. Your 8.5 reports will be fine under CR.Net, but if you create new reports under .Net, you will not be able to open them in 8.5|||who owns the .net version of the crystal reports, is it by microsoft corporation or seagate?|||Beats me :)

Tuesday, March 6, 2012

.Net 2003 access Crystal Report XI: Error:Failed to open the connection: [Database Vendor Code:

I am receving this error: Failed to open the connection: [Database Vendor Code: 17 ], from .Net 2003/C# to Crystal Report XI with SQL Server 2000 has backend database.

Is there a security permission that has been overlooked?

Here is the code I use to access CR XI

ConnectionInfo connectionInfo = new ConnectionInfo();
TableLogOnInfo tableLogOnInfo;
Database DB;
'CrystalDecisions.CrystalReports.Engine.Table' table;
Tables tables;

//Log in
connectionInfo.ServerName = "ServerName";
connectionInfo.DatabaseName = "Database Namet";
connectionInfo.UserID = "userid";
connectionInfo.Password = "password";

//Get Table inf from report
DB = reportDocument..Database;
tables = DB.Tables;


//Looping through all the tables in CR and apply connection info
for(int i = 0; i < tables.Count; i++)
{
table = tables[ i ];
tableLogOnInfo = table.LogOnInfo;
tableLogOnInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(tableLogOnInfo);

}

CrystalReportViewer.ReportSource = ReportDocument.ReportSource;
CrystalReportViewer.Visible = true;

Any advise would be helpful.
Thank you

Hi, Koolaidbomber

First, try to find osql.exe on your client box, "c:\program files\microsoft sql server\80\tools\binn", osql.exe /S<servermachine> /E, or "osql.exe /S<servermachine>\<Instancename> /E"( the latter is for named instance). would you also get the same error? For remote connection specific you need following checklist:

A. Enable "File and printer sharing" in Firewall if your server is behind that.

B. Add program "sqlbrowser.exe" or udp port "1434" in your firewall exception list.

C. Add tcp port "1433" of default instance or <port number> of named instance in firewall, check you errorlog to figure out which port server is listening on. If you want your connection over TCP and make sure your server has TCP enabled.

D. Try ping your remote server machine, name and ipaddress.

E. Try to telnet <remoterservername> <portnumber>

F. Try to access a share of your remote server.

If above list all passed, you should be able to connect to linked server unless other problem exists, normally, you could see event log or server log to get clue.

Good Luck!

Ming.

|||Ming,

Thank you for your response. Will try it and let you know.

Thanks again|||Hey Ming,

I gave what you suggested a go, but I still get the error when I access CR XI from .Net 2003. I have connection to the DB server, and I am able to run the CR XI on a stand alone bases, but when it come to accessing from .Net 2003 Web App, I get the error.

Thank again for your idea|||

I recommend reading http://msdn2.microsoft.com/en-us/library/ms227528.aspx regarding how to setup Crystal Reports to connect to SQL Server tutorial.

Since are you able to run the CR XI on standalone, sounds like your Web App config is wrong.
Please post the config setting for your web app.

Jimmy

|||Hi Jimmy -

As requested, here is a copy of my web.config file

<?xml version="1.0" encoding="utf-8"?>
<configuration>

<system.web>

<compilation defaultLanguage="c#" debug="true"><assemblies><add assembly="CrystalDecisions.CrystalReports.Engine, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Framework, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.InfoStore, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Web, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies></compilation>

<customErrors mode="RemoteOnly"/>

<authentication mode="Windows"/>

<authorization>
<allow users="*"/>

</authorization>

<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>

<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>

<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

</system.web>

</configuration>

I will read over the documentation, and let you know if this error gets firgured out.

Thank you

.Net 2003 access Crystal Report XI: Error:Failed to open the connection: [Database Vendor Co

I am receving this error: Failed to open the connection: [Database Vendor Code: 17 ], from .Net 2003/C# to Crystal Report XI with SQL Server 2000 has backend database.

Is there a security permission that has been overlooked?

Here is the code I use to access CR XI

ConnectionInfo connectionInfo = new ConnectionInfo();
TableLogOnInfo tableLogOnInfo;
Database DB;
'CrystalDecisions.CrystalReports.Engine.Table' table;
Tables tables;

//Log in
connectionInfo.ServerName = "ServerName";
connectionInfo.DatabaseName = "Database Namet";
connectionInfo.UserID = "userid";
connectionInfo.Password = "password";

//Get Table inf from report
DB = reportDocument..Database;
tables = DB.Tables;


//Looping through all the tables in CR and apply connection info
for(int i = 0; i < tables.Count; i++)
{
table = tables[ i ];
tableLogOnInfo = table.LogOnInfo;
tableLogOnInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(tableLogOnInfo);

}

CrystalReportViewer.ReportSource = ReportDocument.ReportSource;
CrystalReportViewer.Visible = true;

Any advise would be helpful.
Thank you

Hi, Koolaidbomber

First, try to find osql.exe on your client box, "c:\program files\microsoft sql server\80\tools\binn", osql.exe /S<servermachine> /E, or "osql.exe /S<servermachine>\<Instancename> /E"( the latter is for named instance). would you also get the same error? For remote connection specific you need following checklist:

A. Enable "File and printer sharing" in Firewall if your server is behind that.

B. Add program "sqlbrowser.exe" or udp port "1434" in your firewall exception list.

C. Add tcp port "1433" of default instance or <port number> of named instance in firewall, check you errorlog to figure out which port server is listening on. If you want your connection over TCP and make sure your server has TCP enabled.

D. Try ping your remote server machine, name and ipaddress.

E. Try to telnet <remoterservername> <portnumber>

F. Try to access a share of your remote server.

If above list all passed, you should be able to connect to linked server unless other problem exists, normally, you could see event log or server log to get clue.

Good Luck!

Ming.

|||Ming,

Thank you for your response. Will try it and let you know.

Thanks again|||Hey Ming,

I gave what you suggested a go, but I still get the error when I access CR XI from .Net 2003. I have connection to the DB server, and I am able to run the CR XI on a stand alone bases, but when it come to accessing from .Net 2003 Web App, I get the error.

Thank again for your idea|||

I recommend reading http://msdn2.microsoft.com/en-us/library/ms227528.aspx regarding how to setup Crystal Reports to connect to SQL Server tutorial.

Since are you able to run the CR XI on standalone, sounds like your Web App config is wrong.
Please post the config setting for your web app.

Jimmy

|||Hi Jimmy -

As requested, here is a copy of my web.config file

<?xml version="1.0" encoding="utf-8"?>
<configuration>

<system.web>

<compilation defaultLanguage="c#" debug="true"><assemblies><add assembly="CrystalDecisions.CrystalReports.Engine, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Framework, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.InfoStore, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Web, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies></compilation>

<customErrors mode="RemoteOnly"/>

<authentication mode="Windows"/>

<authorization>
<allow users="*"/>

</authorization>

<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>

<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>

<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

</system.web>

</configuration>

I will read over the documentation, and let you know if this error gets firgured out.

Thank you