cancel
Showing results for 
Search instead for 
Did you mean: 

ReportDocument - Log on failed

Former Member
0 Kudos

Hi all!

I have problem, when trying to connect to database, when report is being used 'SAP Business One' connection

type.

when it is 'OLE DB (ADO)' everything works fine.

i tried following code:



CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rDocClient = rDoc.ReportClientDocument;

CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo newConnectInfo = new 

CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfoClass();

CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag logonAttribs = new 

CrystalDecisions.ReportAppServer.DataDefModel.PropertyBagClass();
CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag connectAttribs = new 

CrystalDecisions.ReportAppServer.DataDefModel.PropertyBagClass();

logonAttribs.Add("Data Source", "mySQLServerName");
logonAttribs.Add("B1 License Server", "myLicServer:30000");
logonAttribs.Add("Company User Id", "manager");
logonAttribs.Add("Company User Password", "managerPass");
logonAttribs.Add("Database", "myDbName");
logonAttribs.Add("Locale Identifier", "1033");
logonAttribs.Add("PreQEDatabaseName", "myDbName");
logonAttribs.Add("PreQEServerName", "mySQLServerName");
logonAttribs.Add("Provider", "sqlncli10");
logonAttribs.Add("Security", false);
logonAttribs.Add("Server", "mySQLServerName");
logonAttribs.Add("Server Type", "MSSQL2008");
logonAttribs.Add("Database User ID", "sa");
logonAttribs.Add("Database Password", "saPass");
logonAttribs.Add("Trusted Connection", false);

connectAttribs.Add("Database DLL", "crdb_b1.dll");
connectAttribs.Add("QE_DatabaseName", "myDbName");
connectAttribs.Add("QE_DatabaseType", "SAP Business One");
connectAttribs.Add("QE_ServerDescription", "mySQLServerName");
connectAttribs.Add("SSO Enabled", false);
connectAttribs.Add("QE_SQLDB", true);
connectAttribs.Add("Server Name", "mySQLServerName");
connectAttribs.Add("Data Source", mySQLServerName");
connectAttribs.Add("QE_LogonProperties", logonAttribs);

newConnectInfo.Attributes = connectAttribs;
newConnectInfo.UserName = "sa";
newConnectInfo.Password = "saPass";
newConnectInfo.Kind = 

CrystalDecisions.ReportAppServer.DataDefModel.CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;

foreach (CrystalDecisions.ReportAppServer.DataDefModel.Table table in 

rDocClient.DataDefController.Database.Tables)
    table.ConnectionInfo = newConnectInfo;

try
{
    rDocClient.VerifyDatabase();
}
catch { }

it does not work. it throws COM exception - Log On Failed.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Konstantin,

Please try the ReportLayoutsService provided by B1.

You can find the help in RefDI.chm provided with the installation of SDK.

As per the help:

The ReportLayoutsService service enables you to do the following:

Copy a PLD report layout from one company to another.

Add a Crystal Reports layout or standalone report.

Source table: RDOC (report layouts) and RDFL (associates default report with user, business partners)

Hope this helps in your endevaour.

Regards

Arshdeep Singh Makker

SAP Business One Support

Former Member
0 Kudos

Dear Arshdeep,

Thanks for your answer,

But ReportLayoutsService does not provide methods to export layout to PDF file or to print layout.

it provide methods to copy layouts from one company to another and to define default layout to form.

I need to execute report and export results to PDF file.

0 Kudos

Can you connect and run the report in CR Designer itself?

Once it can be used in the designer then it should also work in the app.

Have you installed the SAP Integration Kit for CR?

Thank you

Don

Former Member
0 Kudos

Dear Don,

Thanks for you attention to this thread.

Can you connect and run the report in CR Designer itself?

- Yes, it is possible to run report in CR Designer

it is possible to run report in SAP B1 interface, using standard SAP functionality.

- Once it can be used in the designer then it should also work in the app.

I don't know, what exactly is wrong, but i think that i didn't define one of parameters, and i don't know, which one exactly.

i didn't found any documentation, which describes how to set connection to SAP B1 datasource type.

i found documentation, how to set up connection, when datasource type is OLE DB.

it is here:

http://www.sdn.sap.com/irj/boc/sdklibrary#section7

and here as well:

http://devlibrary.businessobjects.com/businessobjectsxi/en/devlib.htm#en/boe_sdk/boesdk_dotNet_doc/d...

Have you installed the SAP Integration Kit for CR?

have not tried it yet, will install and try and then i'll post the result here, thanks for suggestions!

0 Kudos

Hello,

Here's some info on various methods to connect as well as get the property bag for the connection info thanks to Adam:

https://wiki.sdn.sap.com/wiki/display/BOBJ/ReportApplicationServerDatabaseConnectivity

Sample - https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8075dc3e-e4ed-2b10-b195-95da43fd...

See if it includes the required info. I don't have B1 available to test.

Thank you

Don

Former Member
0 Kudos

Dear Don,

That links are really helpful for few datasource types.

but it does not contain datasource type SAP Business One.

I checked, that i'm trying to do it in right way, but if had similar example for B1 datasource type, it would be easier.

So, property bug, that I used:

Database DLL - crdb_b1.dll

QE_DatabaseName - myDBName

QE_DatabaseType - SAP Business One

QE_ServerDescription - myServerName (name of my SQL Server instance)

QE_SQLDB - true

SSO Enabled - false

Data Source - myServerName (name of my SQL Server instance)

QE_LogonProperties - another property bug collection:

logon properties:

B1 License Server - my license server address and port

Company User Id - B1 company user name

Company User Password - B1 company user password

Database - myDBName

Locale Identifier - 1033

PreQEDatabaseName - myDBName

PreQEServerName - myServerName

Provider - sqlncli10 (i have ms sql 2008)

Security - false

Server - myServerName

Server Type - MSSQL2008

Database User ID - db user

Database Password - db password

does not work.

i think, that there is some incorrect logon parameters (or i didn't define one of needed parameter), because, when i'm trying to set property:

CrystalDecisions.CrystalReports.Engine.Table.Location

application throws exception:

Logon failed.

Error in File test.rpt:

Unable to connect: incorrect log on parameters.

I will be very appreciate, if you can provide me example or documentation, which exactly parameters should i set to connect using SAP Business One datasource type and using crdb_b1.dll.

thanks in advance

former_member183750
Active Contributor
0 Kudos

What version of CR and what version of .NET are you using?

I am not sure if you will actually be able to connect to SAP 1 using the CR / RAS SDK for .NET. But I have an app that will essentially decompile the report and give you the code that would be used to connect to a db. But the app is CR version dependent, so let me know...

Ludek

Former Member
0 Kudos

Hi Ludek!

Thank you for your answer.

I have not installed CR Designer on machine, where i'm developing application, its not needed.

In my project i'm using assemblies from GAC:

CrystalDecisions.CrystalReports.Engine v. 12.0.1100.0

CrystalDecisions.Enterprise.Framework v. 12.0.1100.0

CrystalDecisions.Shared v. 12.0.1100.0

etc

.Net Framework is v.3.5, but it is possible to use 4.0, if it is needed.

i have few development environments, and few versions of Crystal Reports Designer, i can install any version of Crystal Reports Designer 2008.

for now i have:

Crystal Reports 2008, v 12.3.0.601

Crystal Reports Basic 2008 for SAP Business One , v 12.1.0.892.

former_member183750
Active Contributor
0 Kudos

Konstantin, attached is the app that will give you the code to use for the login.

Umm, sometimes it takes a while to get the file uploaded, so hang on (even if you see the file attached here as it will just be a place holde of some sort...) - give it about 1/2 hour. If it does not download then, I'll email it to you.

Ludek

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Ludek,

you provided nice application, following code were generated:



//Add these required Crystal Assemblies to your project
CrystalDecisions.ReportAppServer.DataDefModel
CrystalDecisions.ReportAppServer.ClientDoc
CrystalDecisions.ReportAppServer.Controllers
CrystalDecisions.CrystalReports.Engine
CrystalDecisions.Shared

//Add these Crystal Assemblies to the top of your code page
using CrystalDecisions.ReportAppServer.DataDefModel;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

private ReportDocument ChangeConnectionInfo()
{
ReportDocument boReportDocument = new ReportDocument();
//**EDIT** Change the path and report name to the report you want to change.
boReportDocument.Load(@"c:\reports\yourreport.rpt", OpenReportMethod.OpenReportByTempCopy);

//Create a new Database Table to replace the reports current table.
CrystalDecisions.ReportAppServer.DataDefModel.Table boTable = 
new CrystalDecisions.ReportAppServer.DataDefModel.Table();
  
//boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
PropertyBag boMainPropertyBag = new PropertyBag();
//boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
//In the main property bag (boMainPropertyBag)
PropertyBag boInnerPropertyBag = new PropertyBag();
  
//Set the attributes for the boInnerPropertyBag
boInnerPropertyBag.Add("B1 License Server", "EASTWOOD:30000");
boInnerPropertyBag.Add("Company User Id", "mfrankli");
boInnerPropertyBag.Add("Database", "BN_BigByte_Sandbox2");
boInnerPropertyBag.Add("Locale Identifier", "1033");
boInnerPropertyBag.Add("PreQEDatabaseName", "BN_BigByte_Sandbox2");
boInnerPropertyBag.Add("PreQEServerName", "EASTWOOD");
boInnerPropertyBag.Add("Provider", "sqlncli10");
boInnerPropertyBag.Add("Security", "False");
boInnerPropertyBag.Add("Server", "EASTWOOD");
boInnerPropertyBag.Add("Server Type", "MSSQL2008");
  
//Set the attributes for the boMainPropertyBag
boMainPropertyBag.Add("Database DLL", "crdb_b1.dll");
boMainPropertyBag.Add("QE_DatabaseName", "BN_BigByte_Sandbox2");
boMainPropertyBag.Add("QE_DatabaseType", "SAP Business One");
//Add the QE_LogonProperties we set in the boInnerPropertyBag Object
boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
boMainPropertyBag.Add("QE_ServerDescription", "EASTWOOD");
boMainPropertyBag.Add("QE_SQLDB", "True");
boMainPropertyBag.Add("SSO Enabled", "False");

//Create a new ConnectionInfo object
CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo = 
new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
//Pass the database properties to a connection info object
boConnectionInfo.Attributes = boMainPropertyBag;
//Set the connection kind
boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
//**EDIT** Set the User Name and Password if required.
boConnectionInfo.UserName = "UserName";
boConnectionInfo.Password = "Password";
//Pass the connection information to the table
boTable.ConnectionInfo = boConnectionInfo;

//Get the Database Tables Collection for your report
CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
boTables = boReportDocument.ReportClientDocument.DatabaseController.Database.Tables;

//For each table in the report:
// - Set the Table Name properties.
// - Set the table location in the report to use the new modified table
boTable.Name = "OSCL";
boTable.QualifiedName = "OSCL";
boTable.Alias = "OSCL";

boReportDocument.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable);

boTable.Name = "SCL5";
boTable.QualifiedName = "SCL5";
boTable.Alias = "SCL5";

boReportDocument.ReportClientDocument.DatabaseController.SetTableLocation(boTables[1], boTable);

//Verify the database after adding substituting the new table.
//To ensure that the table updates properly when adding Command tables or Stored Procedures.
boReportDocument.VerifyDatabase();

return boReportDocument;
}

i changed it to use my server name, databse name, user, password and it throws exception:

Logon failed.

Error in File apple {07714FBC-C660-4C91-8C12-2428BFBF2749}.rpt:

Unable to connect: incorrect log on parameters.

on the code line:

boReportDocument.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable);

it seems, that not enough parameters.

i guess, there should be also company user password.. but even if i add this line:

boInnerPropertyBag.Add("Company User Password", "Welcome1");

it throws the same exception.

0 Kudos

Hi Konstantin,

I heard back from our developer and he said the code is there for this to work in the crdb_b1.dll. It's the one that has the log on dialog box with the extra properties.

I notice in the code the code note the app that Ludek sent generated you indicated you were changing the server info.

"i changed it to use my server name, databse name, user, password and it throws exception:

Logon failed."

What happens if you run that same code using the original log on info, server info, and just update the User Name and password?

The code is for just setting log on info to what is saved in the RPT file, it doesn't replace the connection with new info.

mmmmm...

I believe the refresh button is calling the OLE DB driver because the log on is not correct, something missing but it could be there is a problem....

I'll talk to some of the B1 people and see if I can get access to one of their server for testing.

Can you also do one more test, on the test PC where you are running your app run this [Modules |https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip]utility and save the file and then look at your EXE but also look at the devenv.exe and then look to see if crdb_b1.dll as well as crdb_ado.dll are being loaded.

Thank you

Don

Edited by: Don Williams on Jan 19, 2011 7:41 AM

0 Kudos

Hi Konstantin,

So we've had an internal discussion with the Various Product teams and Program Managers and it would appear the B1 product is a custom build of Crystal Reports Designer and there is no SDK support from the full CR 2008 SDK CR side, or at least on this side of the product. Applying patches would therefore not be supported, we won't know what will happen, B1 is not in any of the Supported Platforms.PDF files.

I suggest you post your question to one of the [B1|/community [original link is broken]; forums and ask them how to make this work in .NET or if it's possible.

Thank you

Don

Former Member
0 Kudos

Hi Don, thanks for answer.

"The code is for just setting log on info to what is saved in the RPT file, it doesn't replace the connection with new info"

passwords are removed from log on info in the RPT file.

at least, i have to set passwords.

i tried this variant and had the same result.

thanks for Modules application, i guess, it might help me.

and i tried to post my question under B1 forum, but no helpful answers there:

we have also posted the Support Message but B1 Support said this is out of the scope

and suggested to post the issue @ BOBJ SDN area, where you now ask to redirect the issue to B1 support

Don, Ludek, thanks a lot guys, you contributed significantly.

will work on it and will try to find out, where is issue.

anyway, if you'll have any inputs/ideas/news, please update the thread

0 Kudos

Hi Konstantin,

Thanks for the info, We have been working with the PM for B1 and CR to get more info. What should be of great help for you is that driver is based on our ODBC dll. Which may explain why when using/configuring the connection info to OLE DB it's not working.

For testing create a DSN to the B1 data and then use the app Ludek sent you to generate the log on code. Plug that into your app and see if it works.

I'm also getting clarification if you can apply CR 2008 patches to the B1 version of CR and use the updated deployment packages too.

Also, CR will NEVER save the password in the RPT file, anyone could extract it and hack your DB.

Thanks again

Don

Former Member
0 Kudos

Guys, just to clarify, in case if my posts are not clear, what i want.

i want to set connection in my application to this datasource type:

http://screencast.com/t/ThRXtz6QaSjT

thanks..

0 Kudos

Hello,

Thank you for the screen shot. One thing I did notice is you are using MS SQL 2008 and client 10 driver. This was an issue in CR 2008 and was fixed in Fix Pack 3.2.

Download this patch https://smpdl.sap-ag.de/~sapidp/012002523100016815822010E/cr2008fp33.exe and then test again.

You could try using the MS Native Client as a quick test to see if that works.

Microsoft changed their driver name so we had to add it to the MS list of DB drivers.

Make sure when you run your app that you are loading crdb_ado.dll from the C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 folder ( x64 OS - remove the x86 for 32 bit OS )

Thank you

Don

Former Member
0 Kudos

Don,

Thank you for answer

yes, you're right, i'm using SQL2008

but.. target environment might not have installed Crystal Reports Designer.

I'm using assemblies from GAC to use ReportDocument object.

it means, that its enough to have Crystal Viewer or SAP Business One to execute Crystal Reports (rpt files)

or (my target) to export reports to PDF files and print it to printer.

Also, it is enough to load and print/export report into object model of Crystal Report - instance of an CrystalDecisions.CrystalReports.Engine.ReportDocument class.

I'm doing it successfully with rpt files, which were created with OLE DB datasource type:

http://screencast.com/t/uVldjAKajUK

that works perfect.

If rpt file was saved with SAP Business One datasource type:

http://screencast.com/t/1tShLxJGHZY

it does not work. (here we have to set more connection parameters)

and are you sure, that for SAP Business One datasource type i should use crdb_ado.dll instead of crdb_b1.dll ?

and my main question:

do you know, what exactly should i put into property bag, when datasource type is SAP Business One?

guys, thank you for helping, i'm trying to figure it out for a long time...

Sorry, Don, probably i didn't understand your suggestion.. should i install fix pack to environment, where we are creating rpt fiels and re-save rpt files to fix my issue? it means, that issue is in rpt file, but not in my application or crystal libraries ?

0 Kudos

Hello,

Ah right... I forgot you were using the crdb_b1.dll. So I don't know if that driver supports the native 10 SQL driver. I'll have to ask the DB developers. It works in the designer so I would assume it should work in code also but I'll have to get confirmation from R&D.

I'm wondering if this property should use:

logonAttribs.Add("Provider", "SQLOLEDB");

rather than specifying the client dll:

logonAttribs.Add("Provider", "sqlncli10");

Also, this is what I use to replace the connection info, if this is what you are trying to do:


        private void ReplaceConnection_Click(object sender, EventArgs e)
        {
            CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            ISCDReportClientDocument rcd;

            rcd = rptClientDoc;

            rptClientDoc.DatabaseController.LogonEx("dwcb12003", "xtreme", "sb", "pw");

            //Create the logon propertybag for the connection we wish to use
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag logonDetails = new CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag();
            logonDetails.Add("Auto Translate", -1);
            logonDetails.Add("Connect Timeout", 15);
            logonDetails.Add("Data Source", "dwcb12003"); // Server name
            logonDetails.Add("General Timeout", 0);
            logonDetails.Add("Initial Catalog", "Orders");
            logonDetails.Add("Integrated Security", "True");
            logonDetails.Add("Locale Identifier", 1033);
            logonDetails.Add("OLE DB Services", -5);
            logonDetails.Add("Provider", "SQLOLEDB");
            logonDetails.Add("Use Encryption for Data", 0);
            logonDetails.Add("Owner", "dbo"); // schema

            //Create the QE (query engine) propertybag with the provider details and logon property bag.
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag QE_Details = new CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag();
            QE_Details.Add("Database DLL", "crdb_ado.dll");
            QE_Details.Add("QE_DatabaseName", "Orders");
            QE_Details.Add("QE_DatabaseType", "OLE DB (ADO)");
            QE_Details.Add("QE_LogonProperties", logonDetails);
            QE_Details.Add("QE_ServerDescription", "dwcb12003");
            QE_Details.Add("QE_SQLDB", "True");
            QE_Details.Add("SSO Enabled", "False");
            QE_Details.Add("Owner", "dbo");

            CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo newConnInfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
            CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo oldConnInfo;
            CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfos oldConnInfos;

            oldConnInfos = rcd.DatabaseController.GetConnectionInfos(null);
            for (int I = 0; I < oldConnInfos.Count; I++)
            {
                oldConnInfo = oldConnInfos<i>;
                newConnInfo.Attributes = QE_Details;
                newConnInfo.Kind = CrystalDecisions.ReportAppServer.DataDefModel.CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
                rcd.DatabaseController.ReplaceConnection(oldConnInfo, newConnInfo, null, CrystalDecisions.ReportAppServer.DataDefModel.CrDBOptionsEnum.crDBOptionDoNotVerifyDB);
            }
        }

My sample is using OLE DB so you will need to change the details.

Are you trying to change the connection or just log on and preview?

As for runtime and users etc. you will need to deploy your application on each desktop, the CR BAsic that comes with B1 I don't believe is up to date.

Thanks again

Don

Former Member
0 Kudos

Dear Don,

thanks for your example, it works for me too.

but only for OLE DB datasource.

and the issue is, that i don't know, what exactly should i change.

i tried to logon and print/export report, also i tried to change connection and print/export report.

I will be very appreciate, if you ask for your colleagues - db developers, which exactly properties should i set up, when datasource type is SAP Business One.

-


guys, thank you again!

former_member183750
Active Contributor
0 Kudos

Hi Konstantin

I talked to a few people and what we want to do is head back to basics;

New Win app, one line of code;

CrystalReportViewer1.ReportSource = <path to report>

Run the above app. It should prompt for database logon. If it does, what does it ask for?

If the app does not prompt, open the report in the CR designer and run it there. What logon info is it asking for in the designer?

I'll also ping a CR Program Manager and ask if this is possible.

- Ludek

Former Member
0 Kudos

Dear Ludek,

thanks for suggestion.

I've created new Windows Application, add Windows Form and add CrystalViewer object to Controls collection:


        static void Main()
        {
            Application.Run(new MainForm());
        }


        public MainForm() //form constructor
        {
            InitializeComponent(); //code, generated by visual studio to show win form
            CrystalDecisions.Windows.Forms.CrystalReportViewer viewer = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
            viewer.ReportSource = "e:\\apple.rpt";
            this.Controls.Add(viewer);
        }

when i'm looking at viewer component in Watch debug window (visual studio feature to see what variable contains)

it shows viewer.LogOnInfo with parameters, which shows your CodeBuilder-RasConnectionInfo application:

B1 License Server

Company User Id

Database

Locale Identifier

PreQEDatabaseName

PreQEServerName

Provider

Security

Server

Server Type

but when i click button refresh in viewer control, it asks for 5 parameters (looks like OLE DB):

Server Name

Database

Login ID

Password

Use Integrated Security

http://screencast.com/t/GV2XgleD

that is strange for me, because when i run report in CR Designer it asks for 9 parameters:

SAP Business One Server

License Server

Server Type

Company Database

Company User ID

Company User Password

Trusted Connection

Database User ID

Database User Password

http://screencast.com/t/v1czV4yd

Former Member
0 Kudos

or this:



CrystalDecisions.Shared.ConnectionInfo connectInfo = new CrystalDecisions.Shared.ConnectionInfo();

connectInfo.AllowCustomConnection = false;
connectInfo.DatabaseName =  "myDbName";
connectInfo.IntegratedSecurity = false;
connectInfo.Password = "saPass";
connectInfo.ServerName = "mySQLServerName";
connectInfo.Type = CrystalDecisions.Shared.ConnectionInfoType.CRQE;
connectInfo.UserID = "sa";

connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Database DLL", 

"crdb_b1.dll"));
connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("QE_DatabaseName", 

"myDbName"));
connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("QE_DatabaseType", "SAP 

Business One"));
connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("QE_ServerDescription", 

"mySQLServerName"));
connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("QE_SQLDB", true));
connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("SSO Enabled", false));
connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Data Source", 

"mySQLServerName"));

CrystalDecisions.Shared.DbConnectionAttributes attribs = new CrystalDecisions.Shared.DbConnectionAttributes();
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("B1 License Server", "myLicServer:30000"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Company User Id", "manager"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Company User Password", "managerPass"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Database", "myDbName"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Locale Identifier", "1033"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("PreQEDatabaseName", "myDbName"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("PreQEServerName", "mySQLServerName"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Provider", "sqlncli10"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Security", false));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Server", "mySQLServerName"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Server Type", "MSSQL2008"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Database User ID", "sa"));
attribs.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("Database Password", "saPass"));
connectInfo.Attributes.Collection.Add(new CrystalDecisions.Shared.NameValuePair2("QE_LogonProperties", 

attribs));


CrystalDecisions.Shared.TableLogOnInfo tlo = new CrystalDecisions.Shared.TableLogOnInfo();
tlo.ConnectionInfo = connectInfo;
foreach (CrystalDecisions.CrystalReports.Engine.Table table in rDoc.Database.Tables)
    table.ApplyLogOnInfo(tlo);

try
{
    rDoc.VerifyDatabase();
}
catch { }

it does not work as well, throws the same exception.

i'll appreciate for any suggestion.

thanks in advance!