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);
	}
}

 

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 853 views
  • 0 likes
  • 2 in conversation