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
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);
}
}
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; "
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.