This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
versago3:dataview_setup [2022/09/07 11:39] dlee |
versago3:dataview_setup [2023/07/14 12:38] (current) dlee [Stored Procedure] |
||
|---|---|---|---|
| Line 47: | Line 47: | ||
| * Click [**Execute**] to validate the statement. | * Click [**Execute**] to validate the statement. | ||
| * Standard SQL error messages will be displayed if errors are encountered. | * Standard SQL error messages will be displayed if errors are encountered. | ||
| - | | + | |
| - | ===SQL Statement Restrictions=== | + | === SQL Statement Restrictions === |
| - | Certain SQL statements are not allowed | + | * An **Order By** clause cannot be used except in cases where the statement contains a TOP operator. The ordering (sorting) is handled by the data view's Field Display settings |
| + | * **Computed values** | ||
| - | * An **Order By** clause cannot be used except in cases where the statement contains a TOP operator. The ordering (sorting) is handled by the report output process. See // | + | ==== B1 Query ==== |
| - | * A **Select Distinct** statement cannot be used directly. This is due to some internal constraints used in the Versago SQL processing. If “Select Distinct” is needed it will need to be done using a sub-query. | + | |
| - | * **Computed values** in the SQL statement must be assigned an alias. For example, the statement “ColA + ColB” will not work. Instead, you would need to use something like “ColA + ColB as [CalcValue]” where [CalcValue] is the alias. “CalcValue” is then seen as a valid column in the subsequent report definition steps. | + | |
| - | ===== Crystal Report ===== | + | This option should only be used with connections to SAP Business One. This option allows to select user queries built in SAP Business One. |
| - | A different data presentation option is provided through the **Crystal Report** method. In this case a Crystal Report is developed outside of Versago. The report is then registered in Versago and used as the presentation method. | + | ==== Stored Procedure ==== |
| - | - Select | + | In some rare instances it may be necessary to use an SQL Stored Procedure as the data source. This approach |
| - | - A dialog box is presented to select the desired Crystal Report. | + | |
| - | {{ | + | Store procedure parameters must be configured in the **// |
| - | - Click [**Choose File**] to open the standard Windows Explorer tool. | ||
| - | - Locate and “open” the desired Crystal Reports file (.RPT). | ||
| - | - The file name is displayed in the Versago dialog. | ||
| - | - Click [**Select**] to associate the Crystal Report file with the Versago report. | ||
| - | - Once the file has been selected you will see file path information displayed in the Report Data Source box. | ||
| - | {{ :versago/reports24.png? | + | <WRAP center round important 100% > |
| + | **Stored Procedure Limitations** | ||
| + | </WRAP> | ||
| + | Versago uses the view sys.dm_exec_describe_first_result_set_for_object to determine the store procedure' | ||
| + | However, there are limitations with the system view that restricts the use of some store procedures in Versago. | ||
| + | The limitations include the use of temp tables and dynamic sql in the store procedure. | ||
| - | The Crystal Report source file is copied from the original location | + | Use the following query to determine if your store procedure will be suitable |
| - | <WRAP center round tip 80%> | + | <code> |
| - | General information about configuring Crystal Reports for use with Versago and Bizweaver is found **// | + | SELECT name, system_type_name |
| - | </WRAP> | + | FROM sys.dm_exec_describe_first_result_set_for_object(OBJECT_ID(@StoredProcedureName), |
| + | </code> | ||
| + | |||
| + | |||
| + | ====View==== | ||
| + | This option allows the use of a database View as the data source | ||
| + | | ||
| + | ==== Crystal Report ==== | ||
| + | A Data View can be configured to display a Crystal Report. When this option is selected, the Crystal Report definition file is uploaded to the Versago site and used as the presentation method. | ||
| - | =====B1 Saved Query===== | + | <WRAP center round important 80% > |
| + | The data source used in the Crystal Report definition **must** be the same as that of the Versago Data View connection. | ||
| + | </ | ||
| - | The **B1 Saved Query** option | + | |
| + | | ||
| - | The database connection (“Database” as described earlier in this document) must include | + | The Crystal Report source file is copied from the original location to the folder |
| - | | + | --- |
| - | | + | =====**Need |
| - | - Select the desired query. | + | |
| - | While this option is available, the preferred approach is to copy the query from Query Manager in SAP Business One and paste it into Versago as a SQL Select statement. | + | ===SQL Server=== |
| + | When designing a Crystal Report that will use a __SQL Server__ database as its data source, the report connection type must be **OLE DB (ADO)**. This connection type has three options for the data provider: **SQL Native Client**, **Microsoft OLE DB Driver for SQL Server**, | ||
| - | =====Stored Procedure===== | + | ===HANA=== |
| + | When designing a Crystal Report that will us a __HANA__ database as its data source, the report connection type be **ODBC (RDO)**. | ||
| - | In some rare instances it may be necessary to use a SQL Stored Procedure as the data source. This approach is not recommended if any other option is available. However, it is available. | + | < |
| + | DRIVER={B1CRHPROXY32}; | ||
| + | </ | ||
| - | - Select | + | Replace < |
| - | - Click the “Report Data Source” drop-down to see a list of available stored procedures in the designated database. | + | |
| - | - Select the desired procedure. | + | |
| - | Keep in mind that if the procedure is changed so that different/ | ||
| - | =====View===== | ||
| - | The “View” option has been deprecated since a SQL View can be referenced in the SQL Select option. | ||
| ---- | ---- | ||
| + | **[[versago3: | ||
| **[[versago3: | **[[versago3: | ||
| | | ||