'스크립트 가져오기'로 OutlineBox 제목을 가져오는 방법안녕,
'스크립트 가져오기' 함수를 사용하여 .jrp 파일로 결합할 수 있는 보고서에 대한 정보를 가져오려고 합니다( 이 게시물 의 세부 정보와 유사하지만, 부팅 시 .jrp에 대해 실행되는 추가 구성 요소를 추가할 예정이므로 '보고서 창 저장' 함수를 사용하지 않습니다). 문제는 OutlineBox 제목(스크립트에 의해 이름이 지정되고 더 넓은 프로젝트에서 변경 사항이 있는 경우 추적됨)도 가져와야 한다는 것입니다. 그렇지 않으면 보고서를 실제로 다시 만들 수 없습니다. 아래 예를 참조하세요.
OutlineBox 제목도 가져오는 '스크립트 가져오기' 함수에서 뭔가 빠뜨린 게 있나요?
names default to here(1);
report_win = New Window("Testwindow",
Outline Box("tester",
Textbox("Test")
)
);
report_win << Get Script;
//RESULT: V List Box( V List Box( Outline Box( Text Box( "Test" ) ) ) )
//If I were to take that same script and try to recreate as a jrp file works....
//New Window("test", V List Box( V List Box( Outline Box( Text Box( "Test" ) ) ) ))
//resulting failure: expected character arg 1 in access or evaluation of 'Outline Box' , Outline Box/*###*/(Text Box( "Test" ))
자동화 및 스크립팅Re: 'Get Script'로 OutlineBox 제목을 가져오는 방법<< 스크립트 가져오기를 사용하려는 작업에 사용할 수 있는지 잘 모르겠습니다. 그리고 사용할 수 있는/해야 하는 작업은 최종 목표에 따라 달라집니다. << 창 보고서 저장을 사용할 수 없는 이유를 제가 잘 모르고 있는 것 같지만, 하나의 방법일 수도 있습니다.
Names Default To Here(1);
report_win = New Window("Testwindow", << Type("Report"), Outline Box("tester", Text Box("Test")));
report_win << Save Window Report("$TEMP/test.jrp");
s1 = report_win << get script;
wait(0);
s2 = Parse(Load Text File("$TEMP/test.jrp"));
wait(0);
Delete File("$TEMP/test.jrp");
Show(s1, s2);
ob_script = Extract Expr(s2, Outline Box(WildList()));
s1 = V List Box(V List Box(OutlineBox(Text Box("Test"))));
s2 = New Window("Testwindow", Outline Box("tester", Text Box("Test")));
Outline Box("tester", Text Box("Test"))
Re: 'Get Script'로 OutlineBox 제목을 가져오는 방법XPath를 사용하는 것이 더 간단하고 직접적일 것 같습니다. 다음 그림을 참고하세요.
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ), Fit Line( 1 ) );
rpt = biv << Report;
outlineNames = (rpt << XPath( "//OutlineBox" )) << Get Title;