DDQING
19th September 2002, 06:31
in session 'Maintaince Report',i press 'debug' button,but appeared script different from the script which appeared when i press 'edit script',the first session longer than second.
what's the reason?how can i debug the script which appeared when i press 'edit script'.Thank you.

pconde
19th September 2002, 09:16
Hello,


When you debug a report, you see also all the baan code linked with this report. So you go first in the code that accepts the data, then the code that sorts the data and at end all the code for creating your report. Try to set breakpoints to avoid the walk in all his code


regards

zacharyg
19th September 2002, 09:44
Hello,

The nature of the problem seems to be an VRC issue.

Use ttstpsessinfo to check that the report can be seen in the PACC from the company from which you are testing the report.

OmeLuuk
19th September 2002, 13:37
When compiling a session in "Maintain sessions" you may notice that there are two binaries involved: std_gen and bic
std_gen makes the 4GL script into a 3GL source (adding function main, functions for each section in the script etc, also adding standard function calls for form handling etc.) which can in turn be compiled with bic which compiles the 3GL script to bshell code (object).

When compiling a report in "Maintain reports" a similar thing happens, in this case it is rep_gen that makes 3GL code from the 4GL report script. But in case of a report, also the layout and the label information etc all must be put in the 3GL code. These include parts of the report that can contain conditions (like only print when there is some report-layout programmed condition true) that otherwise would never be visible nor debuggable.

The script you are seeing is the 3GL script from rep_gen, that contains a function main(), r_main() etc. It includes "standard program like" functions and does also include your report script code.

The difference with a "normal" session in debug is that the standard functions in the standard program are not visible to the user. You can tell by pressing f (function stack trace) in the debug window: you will see things like main (no debug) std_main (no debug) etc... indicating that those dll's are not compiled in debug mode, so you cannot see the function handling there.

Hope this clears your doubt.

garfield ruhr
19th September 2002, 13:39
Hi,

a report object is created in 2 steps. First code is generated in the repgen step from the layout definition. After the repgen the report script is added to the generated sript and then the compleate set is compiled to an object. If you now debug the report you have the compleate script (generated part combined with the user written part) in the debugger.

For easy reports you have just the generated part (no script present).

I hope this helps a bit,

Garfield :)

Fred67
19th September 2002, 14:38
To debug I do This

In before.program I set a variable such as :
before.program:
toto = 1
toto = 0

then in debug mode I trace the variable (t toto), then type c to continue.
the debug will stop in the before.program section on toto.

Then you acces to the report script and set breakpoints were you want.
This works in Baan IV

Regards,

FRED