Report Definitions

Previous  Next |  Direct link to this topic

Report definitions are where you tell the system where each of your crystal report files is located on the network and what parameters are needed to show the report. These are used in the main configuration.

 

[See a video of the feature]

The Crystal Reports we work with can be stored in 2 different ways either as file specific or in the database specific.

TIP you can switch/ Convert from either of the 2 settings file/database to the other by right clicking and selecting the Convert to File Source/Convert to Database Source

 

File Specific Settings

image008

 

Field

Description

Report (File)

 

Here you choose your crystal report layout you wish to launch. You can type in the path to the file or press the "…" button to choose the file. Once you choose the file it will be scanned for parameters

and shown below.

NB: PLEASE BE AWARE THAT IF MULTIPLE USERS NEED TO RUN THE REPORT, THE PATH TO THE FILE SHOULD BE A SHARED PATH (EXAMPLE: \\SAP-SERVER\CRYSTAL\DOCUMENT MASTER.RPT)

 

Tip:

It is possible to use the following keywords in the Report Path to make it dynamic:

 

$[B1P&D_SHARED_FOLDER]

$[COMPANYNAME]

$[SERVERNAME]

$[DATABASENAME]

$[ATTACHMENT_FOLDER]

$[WORD_FOLDER]

$[BITMAP_FOLDER]

$[EXCEL_FOLDER]

$[EXTENSION_FOLDER]

$[USER]

$[USERNAME]

Edit-button (File Only)

If you are on a machine with the Crystal Report designer installed you can press the Edit-button to edit the selected report.

 

Database Specific Settings

clip0046

 

Field

Description

Report (Database)

Here you choose your crystal report layout you wish to launch. from a selection of those in the database.

 

NB: You can also press the golden arrow to get a list of all the crystal there currently is in the database

Import Crystal

Here you can import a new Crystal to the database from a File

pressing this will open a new where you can give a name for the crystal in the database together with the path to the crystal report file

clip0044

NB: Pressing Add will imediatly add the crystal to the database and have the

Export Crystal

This will allow you to export the crystal from the database to a file of your choice

Edit Crystal

This option Will create a temporary file and open it. the file can then be edited and saved.

 

after having saved the edited file and closed the Crystal report designer. You can refresh the report definition UDO and the option to either Commit or Discard the changed will be shown

clip0045

Commit: will replace the current crystal in the database with Crystal Report File containing the changes

Discard: Will delete the edited version of the Crystal report file

 

 

Replace Crystal

This will allow you to replace the selected Crystal report in the database with a new Crystal report file.

 

 

Shared Settings

Field

Description

Code

The unique code of the report-definition (Can be up to 8 chars)

Name

The name of the report-definition

Report source

The source from which the report loaded.

This can either be from a File or a record in the database

 

TIP: if you have file permission problems it could be beneficial to switch to using database source crystal

NB: you can convert from existing report definition from file source to database source by right clicking in ok mode and selecting the ( Convert to File Source /Convert to Database Source)

 

 

 

 

 

 

 

 

Refresh parameter-button

If you have already chosen a Crystal Report file, but after selection, you update the layout to include more parameters, you can click this button to update the list of parameters below.

 

TIP: IF YOU ALREADYENTERED VALUES FOR THE PARAMETERS AND PRESS UPDATE THE SYSTEM WILL TRY TO PRESERVE EXISTING VALUE AS LONG AS THE PARAMETER NAME IS THE SAME.

Parameters

In Crystal Reports, you have the option pass along parameters to the report (example: a specific customer code or a specific document number).

Colum

Description

Parameter

Here the names of the parameters in the report is automatically drawn and shown

Value

Here you enter the value that you wish to send along to the report. You have several options on how to pass along parameters

-         No value

o   If you leave the value empty the report at launch ask you for a value before showing the report
(NB: This is only possible if action is Show Report)

-         Fixed value

o   You can enter any fixed value (123, abcetc. all depending on your report parameters value)

-         DocKey@ keyword

o   This special keyword defined by SBO8.8 will give you the DocEntry-field of all sales and purchase documents

-         ObjectId@ keyword

o   This special keyword defined by SBO8.8 will give you the object-type of the document.

§ 23 = A/R Quotation

§ 17 = A/R Order

§ 15 = A/R Delivery Note

§ 16 = A/R Return

§ 203 = A/R Down Payment

§ 13 = A/R Invoice

§ 14 = A/R Credit Note

§ 22 = A/P Order

§ 20 = A/P Goods Receipt PO

§ 21 = A/P Goods Return

§ 204 = A/P Down Payment

§ 18 = A/P Invoice

§ 19 = A/P Credit Note

§ 33 = Activity

§ 24 = Incoming Payment

§ 46 = Outgoing Payment

§ 97 = Sales Opportunity

§ 156 = Pick List

§   [Other can be found in the “SDK Help Center” under BoLinkedObject Enum]

-         Null value

o   Enter the special keyword $[NULL] to pass along a NULL value (this only works if the parameter can be null represented by a "set to null" checkbox when prompting for parameters in the crystal report designer )

-         Dynamic Syntax Value (Header level data only)

o   Use the common dynamic syntax ($[$<item>.<col>.<type>] or $[<table>.<field>.<type>]) to pass along data from the active window in SAP Business One. For more information on the dynamic syntax, see the dynamic syntax guide

§ Sample: $[$8.0.NUMBER] to pass the document number on a Sales Order.

-         SQL value

o   Use the SQL:<your sql> syntax to execute your SQL where the result of the SQL will be passed along as the value. In <your sql> you can use the dynamic syntax

§ Sample: SQL:SELECT DocEntry FROM OINV WHERE DocNum = $[$8.0.0]

Report options

Here you can define what data source the crystal report is using when launching. A Crystal Report as default have a data source attached to it within the report-files, and choosing the option "As in report" will let the report know that it should use the source as it was designed. In scenarios where you use the report in multiple database or if it is not designed on location you can choose the "This database". Doing this will cause B1 Print and Delivery, to on the fly, tell the report that it should use the currently logged in database instead of the data source embedded into the report.

If you have problem with “This database” you can try the “This database Compatible Connection”. This will force the Crystal Report to use predefined value that should work on every system.

 

Customer connection: If you select 'Custom connection' as the connection type you can specify an alternative connection method using the '- Define new - ' option. This allows you to connect to a different database system.

Import-button

You have the option to import exported Report-definitions from XML

Export-button

In OK-Mode you have the option to export the current or multiple Report-definitions to XML.

In add-mode you have the option to export multiple Report-definitions from XML

 

Note on Recommenced Crystal Report Datasources:

Datasource on MSSQL

Datasource on SAP HANA

We recommend using OLE DB (ADO) datasource with provider Microsoft OLE DB Provider for SQL Server

image010

We recommend using ODBC (RDO) datasource with following HANA connection string:

(32-bit)
DRIVER=B1CRHPROXY2;SERVERNODE=<servername/ip>:<port>;DATABASE=<SCHEMANAME>;CS=<SCHEMANAME>;DATABASENAME=<INSTANCE(HANA2 ONLY)>

(36-bit)
DRIVER=B1CRHPROXY;SERVERNODE=<servername/ip>:<port>;DATABASE=<SCHEMANAME>;CS=<SCHEMANAME>;DATABASENAME=<INSTANCE(HANA2 ONLY)>

 

image012