BookmarkSubscribeRSS Feed
Smgduarte
Calcite | Level 5

Good morning community,

 

I'm currently trying to migrate an AddIn developed in VB2010 from version 4.1 to 5.1 of Enterprise Guide.

 

The reason I request your aid today is due to this error: "Error 2 The name 'sasDataSetEDR' does not exist in the current context 'path' ". While using version 4.1 I had it declared as "private SAS.EG.Controls.SASDatasetSelector xpto", but sadly using version 5.1 it doesnt use the same dll file.

 

Could you please guide me through, on which dll to properly use in order to have the same functionality.

 

Thanks.

 

Best Regards,

 

Sérgio Duarte

2 REPLIES 2
ChrisHemedinger
Community Manager

Instead of embedding a control, later versions of EG provide an API (ShowOutputDataSelector) that allows you to invoke the EG data selector directly.  There is an example in the SAS Running Totals task (GitHub).  Looks something like this:

 

 

// Allow user to browse to output data location
private void btnBrowseOut_Click(object sender, EventArgs e)
{
	// this calls back into application
	// and tells it to display browse dialog
	string cookie = "";
	ISASTaskDataName od = Consumer.ShowOutputDataSelector(this,
		ServerAccessMode.OneServer,
		Consumer.AssignedServer,
		"", "", ref cookie);

	// the ShowOutputDataSelector doesn't return
	// a cancel status.  So if it produces
	// a null value, that tells us it was
	// Cancel'd
	if (od != null)
	{
		txtOutput.Text = 
			string.Format("{0}.{1}", od.Library, od.Member);
	}
}

 

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Smgduarte
Calcite | Level 5

I'm not sure it fixes my problem. lets consider I have the code bellow how could I migrate from 4.1 to 5.1 and which dll's do I need:

 

 

" private SAS.EG.Controls.SASDatasetSelector sasDataSetEDR;

 

......

SASDatasetSelector sasDataSet = new SASDatasetSelector();

 

sasDataSet.Server = servidor;
sasDataSet.Consumer = consumer;
sasDataSet.Parent = contentor;

 

......(add some resources)

 

contentor.Controls.Add( sasDataSet);  //  this dataser is being added to a form

sasDataSet.Show();

return sasDataSet; "

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 833 views
  • 0 likes
  • 2 in conversation