Page 1 of 1

launch preview does not work

Posted: Thu Sep 19, 2013 5:15 am
by oumouna
Hello,
I have a dropdown list that I load from a field in a database, but when I do a launch preview of my screen datas don't appear.

Re: launch preview does not work

Posted: Thu Sep 19, 2013 10:55 am
by Scott Klement
does it work when you display the screen from an RPG program?

Re: launch preview does not work

Posted: Thu Sep 19, 2013 11:47 am
by oumouna
I have not yet written the RPG program, I want to draw my screens first. But it also happened to me with other programs. It works with the RPG program but not with the launch preview. Is it not possible to view the data without writing code?...

Re: launch preview does not work

Posted: Thu Sep 19, 2013 12:46 pm
by Scott Klement
The problem is that database-driven tools will attempt to synchronize themselves with the RPG program that's displaying the screen. This is done in order to:
  • Make sure the SQL statement runs under the same authority (userid/password) as the RPG program that's running it.
  • Make sure the SQL statement runs with the same library list as the RPG program that's running it.
When you simply do a "Preview" from the designer, it can't synchronze with the RPG program, because there's no RPG program running, no userid/password, no library list, etc.

But, you can still get a good idea of what your screens will look like in the preview mode without filling in data from the database. It's actually quite similar to the fact that the non-database driven fields won't be filled in with data in preview mode (unless you type some data.)

Re: launch preview does not work

Posted: Thu Sep 19, 2013 12:55 pm
by oumouna
Ok I see, thank you Scott!