cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
NBrammer
Level III

Add date and file name into any graph

Just wondering if anyone has written an addin or some script that will add the current date and file name (of the source data table) onto any graph/report generated?

I've turned on preferences<reports to make it appear at the top of the report window, but would like it actually on the graph so that when the these are copied and pasted into PP, for example, these details are clearly visible.

thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
hogi
Level XIII

Re: Add date and file name into any graph

Without the references to the data table and to the plot, you can access the gb Object via the report / get scriptable object()  - and the data table via << get data table().
Maybe add some code to skip the LDF and Column Switcher ...

Names Default To Here(1); 
/*
open("$SAMPLE_DATA/Big Class.jmp");

Graph Builder(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);
*/



fbs = current report() << XPath("//FrameBox");
nfbs = N items(fbs); // add the info to the last FB

OBs= current report() << XPath("//OutlineBox");
gb = OBs[1] << get scriptable Object; // add some code to skip LDF and Column Switcher 

str = Char(As Date(Today())) || " " || ((gb << get data table()) << getname);

Eval(EvalExpr(
	fbs[nfbs] << Add Graphics Script(
		Text Color("Red");
		Text(Right Justified, {X Origin() + X Range(), Y Origin()}, Expr(str));
	);
));

View solution in original post

NBrammer
Level III

Re: Add date and file name into any graph

Brilliant - thanks

 

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Add date and file name into any graph

It isn't really that simple to create a script which would work with any graph/report.

 

The basic idea could be something like this but this makes already assumptions that you have a reference to the table and the analysis object. It also assumes that all frameboxes are based on the same table

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);


str = Char(As Date(Today())) || " " || (dt << getname);

fbs = Report(gb) << XPath("//FrameBox");
Eval(EvalExpr(
	fbs << Add Graphics Script(
		Text Color("Red");
		Text(Right Justified, {X Origin() + X Range(), Y Origin()}, Expr(str));
	);
));

but figuring out which is the correct table for example can get fairly complicated.

-Jarmo
hogi
Level XIII

Re: Add date and file name into any graph

Without the references to the data table and to the plot, you can access the gb Object via the report / get scriptable object()  - and the data table via << get data table().
Maybe add some code to skip the LDF and Column Switcher ...

Names Default To Here(1); 
/*
open("$SAMPLE_DATA/Big Class.jmp");

Graph Builder(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);
*/



fbs = current report() << XPath("//FrameBox");
nfbs = N items(fbs); // add the info to the last FB

OBs= current report() << XPath("//OutlineBox");
gb = OBs[1] << get scriptable Object; // add some code to skip LDF and Column Switcher 

str = Char(As Date(Today())) || " " || ((gb << get data table()) << getname);

Eval(EvalExpr(
	fbs[nfbs] << Add Graphics Script(
		Text Color("Red");
		Text(Right Justified, {X Origin() + X Range(), Y Origin()}, Expr(str));
	);
));
NBrammer
Level III

Re: Add date and file name into any graph

Brilliant - thanks

 

Recommended Articles