cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report is not able to find out store procedure in database

Former Member
0 Kudos

Hi,

I am migrating CR8.5 to CR2008(runtime Environment). Here I am getting an error that Store procedure is not found.

in CR8.5 we had used C++ code to envoke crystal we have used LogOnServer function after creating the DSN.

we have also checked connection for both main and subreport. that is why we were able to sucessfully export the report.

Our main problem is :

we have varius user who installs storeprocedure in database i.e at one machine "imadmin" install amd on other machine

user "informix" isstall the store procedure . so in CR 2008 i am passing only one use info i.e UID and PASS to connect to the database but want to access both the store procedure,which is created by another user.

by doing so , CR2008 throws error says"Store procedure not found".

Please Sugges me the solution so that i can access both the storeprocedure with only one database credentials.

Thanks and Regards,

Abhineet

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Don,

Below are answers of the question:

Which report engine are you using now?

We are usning u201CCrystalDecisions.CrystalReports.Engineu201D.

How are you connecting to the database, OLE DB or ODBC?

We are connecting to the database through ODBC. Below are my code snippet for this connection:

// Set the Connection parameters.

connectionInfo.DatabaseName = sdatabase;

connectionInfo.ServerName = dataSourceName;

connectionInfo.Password = password;

connectionInfo.UserID = login;

repDoc.Database.Tables[0].ApplyLogOnInfo(logOnInfo);

// Create data source

bool status = MonAPI.CreateDataSource(hostName, sdatabase);//own function for DSN

string strConnDS = string.Format("Dsn=;Host=;Database=dsclassa;Uid=;Pwd=", dataSourceName, hostName, login, password);

_dbConnDS = new OdbcConnection(strConnDS);

What happen in CR Designer if you set database location?

It through an error some ODBC error.

Can you create a new report?

No, we use the existing report(built in CR8.5). we are not in position to create new report.

I am able to see all the store procedures. I think my problem is not clear with you.

Here once again I am describing my problem:

As per our software configuration either logged on user(say abc) or administrator can install the store procedure in database

So we are not sure that who will install the store procedure in database.

If the store procedures are created by the logged on user abc, in ODBC connection we see

Data basename:abc:proc(u201Cprocedure nameu201D) in store procedure column.

So when we are creating the ODBC connection in C#(through code) for CR2008 , then we are providing admin id and passw of the Informix database, now it is not able to find out the store procedure in database, says u201Cstore procedure could not be foundu201D.

This is the main problem, I want find a way so that we will be able to access the store procedure in any condition(either installed by abc or admin). I want to provide admin id or passw while creating the DSN through code in C#.

Please help.

Thanks and Regards,

Abhineet

0 Kudos

Hi Abhineet,

Could be a couple of things:

connectionInfo.ServerName = dataSourceName; ServerName should be the DSN.

And you should be creating the DSN name before setting the logon info.

Other than that All I can suggest is you check with Informix to verify you are setting permissions to the SP's for all users.

Not that clear but It appears you don't have a version of CR to update all of the reports? We always have recommended updating the RPT files to be the same version as the runtime. I highly suggest you do this, there may be legacy report import issues and as of CR 9 we use a new RPT file format as well and updated log in API's that may not be backward compatible now.

Thank you

Don

Answers (1)

Answers (1)

0 Kudos

Hi Abhineet,

Which report engine are you using now?

How are you connecting to the database, OLE DB or ODBC?

What happen in CR Designer if you set database location?

Can you create a new report?

If you can't see your SP's then after connecting to the DB right click on your connection and select Options and check off everythign except Stored Procedures. If you still can't see anything try one of the other options also to verify you can see tables.

Thank you

Don