Open a .jrp file with JSL, but the open function returns nothingHello, I met a problem that confused me so much.
When I open a .jrp file using Open() function, nothing is returned.
Names Default To Here( 1 );
rp = Open("<PATH-TO-FILE>\RxOsnrTol-01-Distribution-By(Temperature).jrp");
Show(rp);</PATH-TO-FILE>
Then in the log window, I got:
{Distribution[], Distribution[], Distribution[]}
rp = .;
By the way, the .jrp file is opened and displays normally. It seems that the only problem is the return value is missing.
The .jrp file is saved earlier with embeded data table.
I'm sure that I used the same code several days ago on some other jrp file, the Open() function returns an object. So I'm able to save its picture.
So I'm confused.
JMP Version: 16.2
If any further information or attachment is needed, please tell me.
Thank you very much.
===== Update =====
I attached a very simple example which shows the same problem.
For me, the log shows:
Distribution[]
Open(".\abc.jrp") = ␀;
Data Blending and CleanupRe: Open a .jsl file with JSL, but the open function returns nothingwow, cool!
Definitely worth to dig deeper and lean from the jsl code!
Re: Open a .jsl file with JSL, but the open function returns nothingTo add to my previous update, it does look like there are differences in behavior between JMP 16 and JMP 17 as well. Changes are being made for future releases to improve both the save and open behavior for .jrp files. You best workaround for now might be to use Current Report() to get the window for the recently opened report.
Re: Open a .jsl file with JSL, but the open function returns nothingThanks very much.
I'm nearly sure that 2 weeks ago, I can get an object with only one Open() function, when I open a .jrp file.
So I guess what you saw with the .jrn files are probably ture
Re: Open a .jsl file with JSL, but the open function returns nothing[ Edit: I thought I saw this issue for Journal files, but now I am seeing a return value ]
There does seem to be some inconsistency in the return values from Open(). I don't think this behavior has changed, but I see the same thing that you describe for both .jrp (JMP Report) and .jrn (JMP Journal) files. While the initial Open() does not return the result, if you call Open() a second time, it will return the top-most box in the already open window:
Show(Open(".\abc.jrp"));
Show(Open(".\abc.jrp"));
Result:
Open(".\abc.jrp") = ␀;
Open(".\abc.jrp") = DisplayBox[HeadBox];
Re: Open a .jsl file with JSL, but the open function returns nothingThanks for your help. I uploaded a very simple jrp with the jsl code together. For me the problem is the same.
Re: Open a .jsl file with JSL, but the open function returns nothingCan you share the .jrp file with the community?
Re: Open a .jsl file with JSL, but the open function returns nothing@txnelson I tried to change the ext to jsl, and it runs well, and no log or error occured.
By the way, with the code above, I'm able to open the .jrp report normally, the only problem is the Open() function returns nothing.
Sorry that I didn't make it clear in the original post
Re: Open a .jsl file with JSL, but the open function returns nothingYes, with the script above, I can see the report opened normally. The only problem is that the Open function returns nothing.Re: Open a .jsl file with JSL, but the open function returns nothing@Setsuna , a .jrp file is actually just a special type of .jsl file. Therefore, you can change the extension from .jrp to jsl and then open the file in JMP an it will open using the Script Editor. That may also help you understand what a possible problem may be with the file.
Re: Open a .jsl file with JSL, but the open function returns nothingWe might need more information to address your question. Are you able to open the .jrp file via the GUI with no problems?