In Sage X3, we may come across a situation where we need to prevent printing of a report and we can achieve this using code.

Steps to follow : 

To prevent printing of a report we need to create a specific processing script for the report and put the following code in the file.

Script Editor

The principle is that when you set GOK to 0, the report will not be printed. Of course, you have to substitute the dots after ‘If’ with the appropriate condition. For example, suppose that you print a report from the Deliveries function (GESSDH) and you want to print it only if the delivery is validated then you need to put specific conditions to prevent report printing.

This action is called just before the printing of the document by Crystal Report. Warning! This action is mandatory, if an initialization process is specified in the report dictionary. It is not called by the instruction Gosub but by the Call instruction. Two parameters are passed to it, NBPAR (number of parameters) and PARAMETRE (parameters grid).

It is used for other functionalities as well which are explained in below points:

  • As mentioned, it is used for preventing report printing when GOK variable value is set to 0.
  • To update the X3 tables (for e.g. print flags etc.)
  • construct a work table in order that the data may be more easily used by par Crystal Report.

It has also been used as an entry point. It was developed for earlier versions of X3.

Entry point IMPRIME had been created for one of the initial X3 versions. It had to be called just before selecting the printer and made it possible to inhibit the printer entry if variable GPE was different from 0.

The parameters are stored in the PARAMETRE variable with the indices 1 to NBPAR. Each value is a string in the form of “parameter=value” without any other separator.

At this level, the report parameters may be used that are stored in the PARAMETRE (1.NBPAR) grid where NBPAR is the number of parameters A parameter is expressed in this grid in the form : parameter name = parameter value.

There is also DEFIMP entry point which is used to return printer name (destination code) by entering the IMPRIMANTE variable and, if a printer’s name is mandatory.

This entry point is called at the end of the subprogram used to determine a default printer (destination code) even though a printer cannot be found after the standard setup.

This subprogram is called by the AIMDEF action and is usually called in order to initialize the printer before printing a report.

There are also other entry points which are used in the same prospect for the report printing process. (e.g. ALIMETAT) So, this entry points along with other subprogram has various uses for printing reports and other functionalities in X3 as explained in the above blog.

This blog helps to understand how we can prevent report printing pro-grammatically. Beside that it can be used for other usage which are explained in the above points.

About Us

Greytrix – a globally recognized and one of the oldest Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation competence.

Greytrix caters to a wide range of Sage X3, a Sage Business Cloud Solution, offerings. Our unique GUMU™ integrations include Sage X3 for Sage CRMSalesforce.com, Dynamics 365 CRM and Magento eCommerce along with Implementation and Technical Support worldwide for Sage X3. Currently we are Sage X3 Implementation Partner in East Africa, Middle East, Australia, Asia, US, UK. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch – Weight  and Letter of Credit and India Legislation for Sage X3 to Sage business partners, end users and Sage PSG worldwide.

Greytrix is a recognized Sage champion ISV Partner for GUMU™ Sage X3 – Sage CRM integration also listed on Sage Marketplace; GUMU™ integration for Sage X3 – Salesforce is a 5-star rated app listed on Salesforce AppExchange and GUMU™ integration for Dynamics 365 CRM – Sage ERP listed on Microsoft AppSource.

For more information on Sage X3 Integration and Services, please contact us at x3@greytrix.com, We will like to hear from you.

Welcome
Book an Appointment img

Book Your Appointment

Our schedule for November 2024

 
MoTuWeThFrSaSu
 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

 
MoTuWeThFrSaSu
November 27, 2024
8:00 am
8:15 am
8:30 am
8:45 am
9:00 am
9:15 am
9:30 am
9:45 am
10:00 am
10:15 am
10:30 am
10:45 am
11:00 am
11:15 am
11:30 am
11:45 am
12:00 pm
12:15 pm
12:30 pm
12:45 pm
1:00 pm
1:15 pm
1:30 pm
1:45 pm
2:00 pm
2:15 pm
2:30 pm
2:45 pm
3:00 pm
3:15 pm
3:30 pm
3:45 pm
4:00 pm
4:15 pm
4:30 pm
4:45 pm
Holiday
Not Possible
Busy
Free
Today

Please check the appointment details below and confirm: