Creating an Excel ODBC report.
1. Open a new Excel sheet.
2. Click on the 'Data' menu bar --> 'Import External Data' --> 'New Database Query'.
3. You will be prompted with a 'Choose Data Source' table. If you have not done so previously, you can now setup a Data Source / ODBC for the current SAP B1 company you are working with. This is explained further in the section below called 'New Data Source'.
4. Select the Data Source you require, and click ok. You will be prompted with an SA and Password field. Fill those in.
5. In the list of tables, views select the view.
6. Click the 'Next' button and choose how you would like to sort some fields.
7. Finally, click 'Finish' and choose to "Return Data to Excel".
8. When you return to Excel, it will prompt you with where you would like to place your data, select the A1 column (usually this is the first cell).
9. What happens now is that Excel has a dynamic report linked to SAP Business One's CRD1 table. Every time you amend / update the BP Addresses within SAP B1, you can come to this Excel sheet, right click over the data and choose 'Refresh Data' and the Excel sheet will 'draw' the data from SAP Business One. You no longer need to run any queries within SAP B1 and keep exporting it to Excel.
10. Don't forget to save the Excel sheet so you can keep re-using it later (and refreshing the report data).
Creating a New Data Source
(Windows XP / Windows 2000 / 2003 Server etc)
1. Go to the 'Control Panel' --> 'Administrative Tools' --> 'Data Sources (ODBC).
2. Select the 'System DSN' and then click the 'Add' button.
3. Select the Driver to be used from the pull down menu. This is usually "SQL Server" (unless you're using a different database).
4. Name and describe your Data Source. This should be an easy to refer name like the actual B1 company Name.
5. Key in or select from the drop down list your SERVER NAME and click the 'Next' button.
6. For the question "How should SQL Server verify the authenticity of the login ID?" select the second radio button "With SQL Server authentication"
7. Check the box that says "Connect to SQL Server to obtain default settings for the additional config operations" and in the LoginID field, put in your SA username. Key in the SA password as well. Click 'Next'.
8. Check the box that says "Change default database to" and select the company database from the pull down menu. Click 'Next'. Click 'Finish'.
9. Click the 'Test Data Source' and you should have a positive response "TESTS COMPLETED SUCCESSFULLY!"
10. You are now ready to use the newly created Data Source in your Excel ODBC reports.
There are two SQL ODBC drivers that appear to work with SQL Server..
1) The SQL Native Client Driver installed as part of the SQL Server 2005 client services. Use this driver is the Project Node and the SQL Server 2005 are the same PC or if you installed the SQL Server 2005 client services on the WebAccess Project Node.
2) The SQL Server Driver part of Windows XP Professional and Windows 2000 dated 10/28/2003 and later (version 3.70.11.46 of SQLSRV32.DLL). Use this if the SQL Server is on a remote node.
It is easier to use a System DSN. The System DSN allows access to the SQL ODBC drivers no matter who is logged on to the Project Node. The System DSN also makes for less confusion later on.
A User DSN will work as well. The User DSN is specific to each user and allows you to restrict which users have access. However, you must configure a User DSN for each user that might be logged on the Project Node.
Any name can be given to the DSN. But make it one that you can remember This DSN name must be entered into the WebAccess Project Manger as the ODBC Log Data Source.
1. Configure "Native Client SQL Server" DSN
1. From Control Panel open ODBC Data Source Administrator, on the Project Node.
Start -> Control Panel -> Administrative Tools -> Data Sources (ODBC).
Image may be NSFW.
Clik here to view.
2. Select System DSN.
Image may be NSFW.
Clik here to view.
3. Click on the ADD button. This will open the Create New Data Source dialog box, shown below.
Image may be NSFW.
Clik here to view.
4. Look for the driver titled SQL Native Client. If this driver is not listed in the window and the SQL Server is, go to Section 2. Configure SQL Server DSN.
5. Double-click on the driver SQL Native Client. The Create a New Data Source to SQL Server Setup dialog box will open, as shown below.
Image may be NSFW.
Clik here to view.
6. In the Name text box, enter a name for this DSN. You will have to enter this name in WebAccess Project Node.
For example, bwSQLData
7. In the Server combo-box, you must enter the name of the computer running SQL server.
If SQL Server is installed on the Project Node, Select (local).
Otherwise, select the computer with the SQL Server. (Note - if you do not see the other computer listed, you should try to Register SQL server as described earlier).
8. Click on the Next > button.
9. Select "SQL Server authentication".
Enter the sa as the user login ID and the password you created in step 14 of Section 23.3.1 Install SQL Server 2005.
Image may be NSFW.
Clik here to view.
Figure 23.3 Use SQL Server Authentication and SQL Server login ID and Password.
Select Next after you have entered the password for the sa account. (or whatever account you know will work).
10. Check the Change the default database to.
Use the Pull Down box or type the Database name you created in SQL Server Management Studio. This name has to match exactly. Go back to Section 23.3.2 Create and SQL Server Database if you skipped this step or forgot the Database name. In the example it was WebAccessPData.
Image may be NSFW.
Clik here to view.
Select Next.
11. Check "Use regional settings.....".
Image may be NSFW.
Clik here to view.
12. Select Test Data Source.
Image may be NSFW.
Clik here to view.
13. You should see "TESTS COMPLETED SUCCESSFULLY!". Select OK.
Image may be NSFW.
Clik here to view.
If it did not Test Successfully. Try these steps:
If the SQL Server is a remote node, verify that TCP port 1433 is open on the SQL Server Node (i.e. check any firewalls or Windows Firewall).
Verify the SA Login Password or whatever Login ID you used to configure this DSN.
Verify the Database name.
Verify that SQL Server is running.
14. Select OK three times (one for each dialog box) to exit ODBC configuration.
15. You should remember the DSN name, because this is what you will tell WebAccess to use. In this example the ODBC DSN is bwSQLData. It could have been any name that you used, just remember it.
Image may be NSFW.
Clik here to view.
16. Next and last step is to tell WebAccess to use the DSN. See Section 20.8.1 Create an ODBC Log Data Source. and 20.8.2 Select new ODBC Log Data Source. And be sure to Select the ODBC Data source (section 20.8.2).
2. Configure "SQL Server" DSN
Use this section if you do not have the SQL Native Client as in the above example 1. on your project node. You can instead use the SQL Server ODBC Driver of Windows XP Professional and Windows 2000 (version 3.70.11.46 of SQLSRV32.DLL dated 10/28/2003 and later). It is common to use this ODBC driver if the SQL Server is on a remote node.
It is recommended to use the TCP Network Library connection instead of Named Pipes.
1. From Control Panel open ODBC Data Source Administrator, on the Project Node.
Start -> Control Panel -> Administrative Tools -> Data Sources (ODBC).
2. Select System DSN.
Image may be NSFW.
Clik here to view.
3. Click on the ADD button. This will open the Create New Data Source dialog box, shown below.
Image may be NSFW.
Clik here to view.
4. Look for the driver titled SQL Server. If this driver is not listed in the window, then the ODBC SQL Server driver has not been installed properly.
5. Double-click on the driver SQL Server. The ODBC SQL Server Setup dialog box will open, as shown below.
Image may be NSFW.
Clik here to view.
6. In the Name text box, enter a name. For example, bwSQLPdata.
7. In the Server combo-box, use the pull down list or type the name of the computer running SQL server.
If SQL Server is installed on the Project Node, Select Local. Otherwise, select the computer with the SQL Server. (TUNA in the example).
Click on the Next > button.
8. Select "SQL Server authentication" if you followed the examples earlier.
It is also possible to use Windows Authentication if both the Project Node and the SQL Server are in the same domain and you know the login information for a user with access to the SQL Server node.
Image may be NSFW.
Clik here to view.
Figure 23.3 Use SQL Server Authentication and SQL Server login ID and Password.
9. Select Client Configuration and select TCP/IP for Network Libraries.
Also verify the Port Number is correct. 1433 is the default port for SQL Server (but your network Administrator may have changed it).
Select OK.
Image may be NSFW.
Clik here to view.
10. Select Next.
11. Check the Change the default database to.
In the Change the default database to box, use the pull down list to select the SQL database name that you created using SQL SERVER 2005 MANAGEMENT STUDIO.
The name in the above examples is WebAccessData.
Image may be NSFW.
Clik here to view.
12. Check Use ANSI quoted identifiers.
13. Check Use ANSI nulls, paddings and warnings.
14. Select NEXT.
Image may be NSFW.
Clik here to view.
15. Select Use regional settings......
16. Select Finish.
Image may be NSFW.
Clik here to view.
17. We recommend using the Test Data Source.
18. A successful test should look like the following
Image may be NSFW.
Clik here to view.
19. Select OK three times (one for each dialog box) to exit ODBC configuration.
If it did not Test Successfully. Try these steps:
If the SQL Server is a remote node, verify that TCP port 1433 is open on the SQL Server Node (i.e. check any firewalls or Windows Firewall).
Verify the SA Login Password or whatever Login ID you used to configure this DSN.
Verify the Database name.
Verify that SQL Server is running.
20. Remember the DSN name, because this is what you will tell WebAccess to use. In this example the ODBC DSN is bwSQLPData. It could have been any name that you used, just remember it.
Image may be NSFW.
Clik here to view.
21. Next and last steps are to tell WebAccess to use the DSN. See Section 20.8.1 Create an ODBC Log Data Source and 20.8.2 Select new ODBC Log Data Source. And be sure to Select the ODBC Data source (section 20.8.2).