Attached is a picture. As you can see my SQL Connection is showing in the Dictionary Panel but it is not showing as part of the NewDataSources dialog.
Here is a code snippet for my designer init:
Code: Select all
//Designer Configuration
StiDesigner.SavingReport += new StiSavingObjectEventHandler(StiDesigner_SavingReport);
StiDesigner.LoadingReport += new StiLoadingObjectEventHandler(StiDesigner_LoadingReport);
StiOptions.Engine.GlobalEvents.OpenRecentFileInDesigner += new StiOpenRecentFileObjectEventHandler(GlobalEvents_OpenRecentFileInDesigner);
StiDesigner.CreatingReport += new StiCreatingObjectEventHandler(StiDesigner_CreatingReport);
//StiSelectGuiHelper.IsRibbonGui = true; //Replaced by next line.
StiOptions.Windows.GlobalGuiStyle = StiGlobalGuiStyle.Office2007Blue;
StiOptions.Designer.IgnoreOptionReportNeverSaved = true;
DictionaryPanel = StiDictionaryPanelService.GetService();
//DictionaryPanel.ShowDataSourceNewMenuItem = true;
//DictionaryPanel.ShowDataSourcesNewMenuItem = true;
if (_IsDeveloper)
{
StiOptions.Designer.CodeTabVisible = true;
//DictionaryPanel.ShowConnectionNewMenuItem = true;
}
else
{
StiOptions.Designer.CodeTabVisible = false;
//DictionaryPanel.ShowConnectionNewMenuItem = false;
}
And one for my Report Init:
Code: Select all
private StiReport PrepReport()
{
StiReport TheReport;
SqlConnection TheConnection;
StiServiceContainer RegisteredDataAdapters;
//Init Report
SetEnvironmentParameters(_ReportParams);
TheReport = LoadReport();
//Init Data Connection
TheConnection = new SqlConnection(_ConnectString);
RegisteredDataAdapters = StiConfig.Services.GetServices(typeof(StiDataAdapterService));
foreach (StiDataAdapterService dataAdapter in RegisteredDataAdapters)
{
if (dataAdapter.GetDataSourceType() != typeof(StiSqlSource))
{
dataAdapter.ServiceEnabled = false;
}
}
//Register Data
TheReport.RegData("POSitive Retail Manager", TheConnection);
//TheReport.Dictionary.DataStore["POSitive Retail Manager"].IsReportData = true;
TheReport.Dictionary.Connect();
//Register Parameters
MakeParameters(_ReportParams, TheReport);
//Register Custom Functions
RegisterCustomFunctions();
_ReportObject = TheReport;
return TheReport;
}