OK You LAN Guru's explain this report problem (OpenInsight Specific)
At 25 MAY 1999 02:22:28PM Robert Dunmire wrote:
I developed the following code for the click event on a button to print the current record in the form on a stand alone Win95. Declare
Function Repository, Get_Property, Write, Set_Property, Send_EventDeclare Function Repository, Get_Property, Write, Set_Property, Send_Event
* Reset options to not clear form and write record to table
Opts=Get_Property(@Window,"IOOPTIONS")
Opts=1
rv=Set_Property(@Window,"IOOPTIONS",Opts)
rv=Send_Event(@Window,"WRITE")
* Reset the options to clear form with a write
Opts=0
rv=Set_Property(@Window,"IOOPTIONS",Opts)
ID=Get_Property(@Window:".RECORD_NO","TEXT")
Open 'SYSLISTS' to hSysLists then
Write ID to hSysLists,'WORKORDER_':@STATION thenprint=Repository("EXECUTE","SYSPROG*OIREPORT*RDLAYOUT*FLT_WORKORDER.RPT")ENDEND
RETURN 0
With the appropriate GETLIST statment in the report query.
Works great! However when I install it on the clients LAN it doesn't work. It appears that it is not creating the list. Where I hard coded a record once that is the only record it will print no matter what record is active in the form , in another case (same code-different list and reportname) all I get is a blank report.
Why is this happening?
Thanks
Robert
At 25 MAY 1999 04:10PM Matt Sorrell wrote:
Robert,
Silly question here, but have you verified that @STATION has a value?
Matt Sorrell
msorrell@movgal.com
At 25 MAY 1999 04:39PM Robert Dunmire wrote:
Matt
You could write volumes about what I don't know about LAN's. What I do know wouldn't qualify as a short story.
No I haven't checked for a value in @STATION, but sure will. Sure smells like the cause of the problem. Give me a hint where and when I should set the @STATION value. I currently test for username as the app is loaded to determine table, form, etc access. Would this also be the proper place to set the value
Thanks for your quick response to my problem
Robert
At 25 MAY 1999 09:39PM Matt Sorrell wrote:
Robert,
As far as I know, @STATION is a read-only global variable generally derived from either the workstation login name or the MAC address from the NIC (network card).
Under AREV, if @STATION is not defined it is generally due to network drivers being installed incorrectly.
Have you verified that network drivers are installed?
NOTE: This is starting to get out of my depth with OI. I'm mostly an AREV programmer that has started dabbling in OI.
Matt Sorrell
msorrell@movgal.com
At 26 MAY 1999 11:38AM Tony Marler @ Prosolve wrote:
Robert
Matt is probably right about @STATION not getting set. Best bet is to stick a debug line in your code and in the debugger look in Global Variable to make sure @STATION has a value.
@STATION should either have the mac address of the ethernet card or the machine name depending on network drivers. If it is blank then that is your problem. It is a read only variable so you cannot set it. Either amend your code to use @USERNAME for example, or set a DOS variable in Novell/NT login script and use that, or get @STATION working first.
Tony
At 26 MAY 1999 03:43PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
In OI, you can set @STATION, if you have to.
Create a startup procedure and load it there.
You'll need to place it in the environment record on field 32.
The subroutine takes 2 parameters. Ignore the first one, and you can return an @STATION value in the second.
This is really usefull for Citrix/Terminal servers.
akaplan@sprezzatura.com
At 28 MAY 1999 06:08PM Cameron Revelation wrote:
It appears that it is not creating the list.
That's a good place to start. Check it in the System Editor. Verify the list exists and is correct.
Where I hard coded a record once that is the only record it will print no matter what record is active in the form
in another case (same code-different list and reportname) all I get is a blank report.
Sounds like zero records selected. Probably a blank list in SYSLISTS.
Lastly, why "SYSPROG" in the report entity name? Replace that with the value of @appid.
Cameron Purdy
Revelation Software
At 30 MAY 1999 12:17AM James Birnie wrote:
Robert,
This sounds similar to a problem one of our clients experienced:
Reporter has various incredibly annoying issues, one is that if your criteria certain generic characters (eg. -,/ etc) then it will either report "Error in script" message eg. criteria of "WITH JOB_NO EQ '20-A'" will cause above message.
Hence normally we create a list call reporter with a GETLIST command as you did. Similarly however, if your clients workstation contains one of these characters EG WS-1 then the getlist command will be blank as reporter will not retrieve this list from your SYSLISTS file.
I'd suggest you do something similar to the following:
REPORT.KEY=REPORT_':@STATION
CONVERT '!@#$%^&*()/-+' TO '' IN REPORT.KEY
prior to saving list or creating report criteria.
Best of Luck
James.