REETA1967
16th January 2003, 18:15
Hi,

I am new learner of Baan reprot / form . if any body has a simple script for the same, so that i can start .

bye

lbencic
16th January 2003, 19:15
You can have Baan generate a print session based on a main table. Run the 'Generate Sessions' (ttadv2290m000) under the Session menu in Tools. Choose a session name that follows the naming conventions for a print session based on the main table you want to create this for.

Ex: Main Table: Areas (tcmcs045)
Session Name: tcmcs0445m900

The rest of the information will default very well (based on your naming convention), and you can change if you need. Make sure to check 'Generate Script' so you get the source code to look at and modify. Also, make sure to tab through all the fields of this session.

I suggest starting with a simple table like Maintain Areas first, then work up to more complicated reports.

Post back if you run into further difficulties.

REETA1967
17th January 2003, 05:17
thanx for the reply

till here i have no problem, i need some event driven script to move further

Bye

jaapzwaan
17th January 2003, 10:58
Does this help:
Report script overview (http://www.baanboard.com/programmers_manual_baanerp_help_functions_reports_overview_and_synopsis)

Regards,
Jaap Zwaan

lbencic
17th January 2003, 16:46
For event driven script, you can generate a Maintain session, and include the script.

To find out what sections you can add, read up in the online help about Baan 4GL Programming, and 4GL Sections.

To get started, a basic field section would look like:


field.tdsls040.pric: |* Field section tag for tdsls040.pric on the form
before.input: |* Triggered before the user enters
if some.condition then
attr.input = false |* User cannot enter the field
else
attr.input = true |* User can enter the field
endif
check.input: |* After user input, to validate input
if some.validation.conditon then
mess("messcode", 1) |* Display message to user
set.input.error("") |* Disallow their entry
endif



Lots more sections, depending on need.

lbencic
17th January 2003, 16:51
Also note, the Report session script is also event driven, you can validate the field input of the screen values just as above. The Report sessino script does not have a main table, so no updates are performed automatically to the main table during a report. The event of the user choosing 'continue' triggers what you see in the script as the 'choice.cont.process' section, which calls a print function.