<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Correct syntax for argument in  Report () in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Correct-syntax-for-argument-in-Report/m-p/441249#M68960</link>
    <description>&lt;P&gt;I suspect that JMP is interpreting the syntax incorrectly since&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;report( dist[1] )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the syntax to reference a second report branch when a second variable or a By is specified in the platform.&lt;/P&gt;
&lt;P&gt;I have been able to use a workaround to do what you want, using an Eval() function&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;toPass= Report( Eval( dist[1] ) )[Outline Box("weight" ), Outline Box( "Summary Statistics" ), Table Box( 1 ), Number Col Box(1)]&amp;lt;&amp;lt; get (1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 16:45:29 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-12-01T16:45:29Z</dc:date>
    <item>
      <title>Correct syntax for argument in  Report ()</title>
      <link>https://community.jmp.com/t5/Discussions/Correct-syntax-for-argument-in-Report/m-p/441227#M68957</link>
      <description>&lt;P&gt;I am on JMP13 and I understand &lt;A href="https://community.jmp.com/t5/JMP-Wish-List/User-Defined-Function-Return-Multiple-Outputs/idi-p/51827" target="_self"&gt;from here&lt;/A&gt; that I cannot have multiple outputs from a function unless I use lists. So I have put together the following script and it works as expected.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here (1);
delete symbols ();
clear log ();
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

getDistChart = Function({ColName, _LSL, _USL}, {distChart},

New Window(""||ColName||" distribution",

		distChart1 = dt &amp;lt;&amp;lt;Distribution(
			Stack( 1 ),
			Automatic Recalc( 1 ),
			Continuous Distribution(
				Column( :weight ),
				Horizontal Layout( 1 ),
				Vertical( 0 )
			),
			Local Data Filter(
				Close Outline( 1 ),
				Add Filter( columns( :sex ), Where( :sex == "M" ) )
			)
		);

		distChart2 = dt &amp;lt;&amp;lt; Distribution(
			Stack( 1 ),
			Continuous Distribution(
				Column(As Column (ColName) ),
				Horizontal Layout( 1 ),
				Vertical( 0 ),
				Capability Analysis( LSL(_LSL ), USL(_USL) )
			),
			SendToReport(
				Dispatch(
					{},
					"Distrib Histogram",
					FrameBox,
					{DispatchSeg( LabelSeg( 1 ), {Font( "Segoe UI", 7, "Plain" )} ),
					DispatchSeg( LabelSeg( 2 ), {Font( "Segoe UI", 7, "Plain" )} )}
				)
			)
		);

);

op = {distChart1, distChart2};
return (op);

);
dist =  getDistChart ("weight", 55, 185); 
dist1 = dist [1];
dist2 = dist [2];

toPass= Report(dist1)[Outline Box("weight" ), Outline Box( "Summary Statistics" ), Table Box( 1 ), Number Col Box(1)]&amp;lt;&amp;lt; get (1); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, the following does not work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;toPass= Report(dist[1])[Outline Box("weight" ), Outline Box( "Summary Statistics" ), Table Box( 1 ), Number Col Box(1)]&amp;lt;&amp;lt; get (1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and I am wondering if I am making a mistake in the syntax for using an argument in Report()?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:20:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Correct-syntax-for-argument-in-Report/m-p/441227#M68957</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-11T11:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Correct syntax for argument in  Report ()</title>
      <link>https://community.jmp.com/t5/Discussions/Correct-syntax-for-argument-in-Report/m-p/441246#M68958</link>
      <description>&lt;P&gt;Try adding Eval List inside your function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;op = EvalList({distChart1, distChart2});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 16:21:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Correct-syntax-for-argument-in-Report/m-p/441246#M68958</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-12-01T16:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Correct syntax for argument in  Report ()</title>
      <link>https://community.jmp.com/t5/Discussions/Correct-syntax-for-argument-in-Report/m-p/441249#M68960</link>
      <description>&lt;P&gt;I suspect that JMP is interpreting the syntax incorrectly since&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;report( dist[1] )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the syntax to reference a second report branch when a second variable or a By is specified in the platform.&lt;/P&gt;
&lt;P&gt;I have been able to use a workaround to do what you want, using an Eval() function&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;toPass= Report( Eval( dist[1] ) )[Outline Box("weight" ), Outline Box( "Summary Statistics" ), Table Box( 1 ), Number Col Box(1)]&amp;lt;&amp;lt; get (1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 16:45:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Correct-syntax-for-argument-in-Report/m-p/441249#M68960</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-12-01T16:45:29Z</dc:date>
    </item>
  </channel>
</rss>

