t-bud Posted July 22, 2016 Share Posted July 22, 2016 (edited) I am writing a script, and am having an issue with the GetWSSubrow functions. Here is a samble of the script, that creates a spreadsheet, and trys to get the number of subrows created. PROCEDURE TestGetWS; VAR SSheet :HANDLE; subrow :INTEGER; BEGIN SSheet := CreateWS('LXSymbols',2,4); {create worksheet with 2 rows and 4 columns} SetWSCellFormulaN(SSheet, 1, 0, 1, 0, '=DATABASE((R IN [''Lighting Device'']))'); SetWSCellFormulaN(SSheet, 1, 1, 1, 1, '=(''Lighting Device''.''Symbol Name'')'); SetWSColumnOperators(SSheet, 1,0,0,0,1,0,0); {Summarize Column 1} ShowWS(SSheet, TRUE); RecalculateWS(SSheet); subrow := GetWSSubrowCount(SSheet, 1); Message('There are ',subrow, ' Lighting Symbols'); END; run(TestGetWS); I get an error online 14 saying that it expects a new factor. I get the same error regardless of which of the GetWSSubrow* functions I try. Am I doing something wrong, or is the function broken? Running VW2016 SP4 on Windows 10 Edited July 22, 2016 by t-bud Quote Link to comment
Miguel Barrera Posted July 22, 2016 Share Posted July 22, 2016 This is a procedure and not a function PROCEDURE GetWSSubrowCount( worksheet :HANDLE; databaseRow :INTEGER; VAR numSubrows :INTEGER); GetWSSubrowCount(SSheet, 1,subrow); Quote Link to comment
t-bud Posted July 22, 2016 Author Share Posted July 22, 2016 That explains it. Not surprised I was doing something wrong. I should have caught that. Thanks for your help. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.