cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report when created using sybase oledb, gives no appender error

Former Member
0 Kudos

I have a .net 3.5 application which uses Sybase Oledb to export crystal report 2008 to some file format.

While calling the function ExportToDisk, the console shows error as:-

"log4plus:error no appenders could be found for logger <com.sybase.dataaccess.oledb.iunknown.queryinterface>.

log4plus:error please initialize the log4c plus system properly"

This is not any exception I think, because it does not get caught into Catch block when i tried.

What is the reason this message is shown?

The code is as follows:-

ReportDocument reportDocument = new ReportDocument();

reportDocument.Load(reportFileName);

foreach (CrystalDecisions.Shared.IConnectionInfo reportConnectionInfo in reportDocument.DataSourceConnections)

{

reportConnectionInfo.SetConnection("10.253.59.214,5000", "OPS_UTUPG_Adp3", "ops_sa", "TstUsr#1");

}

//Function to set parameters of crystal report.

SetParameters(reportDocument);

string exportFile = @"C:\temp\ExportedReport.doc";

reportDocument.ExportToDisk(ExportFormatType.WordForWindows, exportFile);

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

A few questions;

1) What version of .NET?

2) What SPs have you applied for CR 2008?

3) Are you able to export the report in the CR designer?

4) Can you export to any other format in your app?

5) As a test, create a simple win app, throw the CR viewer on it and see if the report gets displayed in the viewer. Can you export using the export button of the viewer?

Ludek

Former Member
0 Kudos

Thanks for the prompt reply Ludek.

1. I am using .NET 3.5

2. I have applied simple SQL query to select data from database in crystal reports as a command.

No SP is used.

3.I am able to export the report in CR designer , i tried it for text format

4. In my apllication I can export to any othe supported formats like Excel, CSV , doc and rich text.

5. Report gets displayed in CR viewer, and i can export the report too.

Is this error related to some logger . I read this about Log4j apache app, it says that the properties file for og4j logger is not configured so the similar error comes in that case.

former_member183750
Active Contributor
0 Kudos

Umm, SP was Service Pack in this case - sorry about that.

You should be at SP 2 at least:

https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe

I don't know anything about Log4j apache app. Not sure how / why this would come into play in this case(?).

Re. 4) Can you export to any other format in your app?

In your initial post you mention that export to .DOC fails(?). But in the last post you say:

"In my apllication I can export to any othe supported formats like Excel, CSV , doc and rich text."

??

Re. 5) As a test, create a simple win app, throw the CR viewer on it and see if the report gets displayed in the viewer. Can you export using the export button of the viewer?

Can you please try that? You can run one of our sample apps with minor mods. I'd recommend vbnetwin_net_debengine from here:

https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples

Ludek

Former Member
0 Kudos

Hi Ludek,

We do not need SP of crystal report.

I never said that the export to .doc fails.

The case is - i had wriitten one sample console application using the code i posted in first blog, the report gets exported to any format but the console shows error for log4cplus after export to disk function call. As I said ,no exception is thrown.

So i am just wondering why console shows this error.

When i run it through some win app, the error is not at all shown. My work is not stuck by this error, but I wanted to know why this error came.

I have tried exporting from win app, it works fine. No error is shown.

Former Member
0 Kudos

Hi Ludek,

Sorry i did not mention about the sample apps you pointed to, i will try it later but i think there should not be any problem as i am using it in our winn app and that woks fine.

Still i will try and let you know.

Can you think of some other possiblity, why this error came.

Answers (0)