pramod
30th January 2014, 20:22
I am calling a session from a report script. It works while running the session in worktop, but it hangs in webtop. Anyone has got this problem before me and found any solution?

before.program:
start.session(MODAL, "tfacp9101mc00","tfacp1431m000",retval)

Thanks in advance for any update.

Pramod

bhushanchanda
31st January 2014, 08:35
Hi,

Yes, it does hangs. Never required that kind of call to session. You can log an incident with Infor and they will surely guide you to the right way.

pramod
31st January 2014, 16:02
Thank you Bhushan for checking on this. I had a requirement to add more range fields on the form which was not possible without source code. So I have done this in report script. This report prints the items and users wanted to print for a range of item group. There may be a better way to handle this, I'm open to suggestions.

JaapJD
31st January 2014, 16:16
I doubt whether Infor will come up with a solution to start sessions from a report script in webtop.
A better alternative would be to add formfields in the session. You can use (substrings of) the procesinfo$ field for that. And pass that field within the report input fields as well.

bhushanchanda
31st January 2014, 16:35
Hi,

There can be certainly better ways. One solution was what Jaap gave, also you can use session wrappers to add those form fields within session script.

One more way (may be it wont suite you) is to understand the logic of the report and make one of your own with the required inputs.

Also, more complicated ways exists too. Like, you can design a form and use an AFS on that report session to collect the data obtained through that report in some ascii file, collect that data with respect to your inputs. But that might be time consuming if the data volume is high. But, its just one more way.

pramod
1st February 2014, 00:08
I have never messed with procesinfo$, because it was working in my easy way. There are some discussions took place on this earlier in this forum like using free$, procesinfo$ etc. Is it possible to add more than one from and to range fields? Programmer's guide does not have much on this. Where can I see some example of the use of these predefined variables?

bhushanchanda
1st February 2014, 08:27
Hi Pramod,

For your initial requirement i.e. starting a session from report script, there is a way around.

Just create a 3GL script say tcbed001 having a single statement like.

start.session(MODAL,"called_session_code","calling_session_code","")


Now, in the report script use:

activate("otcbed001")

Thats it. It work's in WebUI as well.

pramod
3rd February 2014, 22:55
Hi Bhushan,
I tried your suggestion. It starts the session in Webtop. But it's not waiting to let me enter the values on the form. Progress Indicator box pops up with the percentage processed. I tried the wait.and.activate(), this behaves in the same way like the start.session does.

I tried suspend(5000) just after calling the 3GL script thinking that it would work like wait.and.activate() but it waits 5000 ms to call the 3GL script.

I have another customization where using this function from 4GL session instead of report script and it works fine in webtop.

Programmer's Guide for the start.session() says the following. Base on that it should work from report script . Now I feel it's problem with webtop.

Context
This function is implemented in the 4GL Tools and can be used in 4GL script types.

Notes
You can use start.session() in both 3GL and 4GL programs, but only for starting 4GL sessions.

The function replaces other functions for starting sessions, such as zoom.to$() and start.main.session().

Thank you,
Pramod