Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
14.04.2006, 11:50
|
|||
---|---|---|---|
|
|||
Crystal Report XI Изменение параметров подключения в Runtime |
|||
#18+
Отчеты созданы в Crystal Report XI (полная версия) SP1 В качестве источника данных используются хранимые процедуры, все отчеты были сделаны используя Integrated Security В программе необходимо изменить параметры подключения и тип подключения Нашел статью http://support.businessobjects.com/communityCS/TechnicalPapers/crxi_r2_net_integrated_and_sql_authentication.pdf Делаю аналогичным образом но в результате при Integrated все работает, когда IntegratedSecurity устанавливается в false то сначала вылетает окно подключения с верными параметрами, потом Login failed: ReportDocument report = new ReportDocument(); report.Load("k1_r1.rpt"); TableLogOnInfo tableLogOn = new TableLogOnInfo(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); crConnectionInfo.ServerName = sServer; crConnectionInfo.DatabaseName = sDatabase; crConnectionInfo.UserID = sUser; crConnectionInfo.Password = sPassword; if (sUser.Length==0) { //crConnectionInfo.IntegratedSecurity = true; report.DataSourceConnections[0].IntegratedSecurity = true; } else { //crConnectionInfo.IntegratedSecurity = false; report.DataSourceConnections[0].IntegratedSecurity = false; } for (int i=0;i<report.Database.Tables.Count;i++) { tableLogOn = report.Database.Tables .LogOnInfo; tableLogOn.ConnectionInfo = crConnectionInfo; report.Database.Tables.ApplyLogOnInfo(tableLogOn); report.Database.Tables.Location = report.Database.Tables.Location.Substring(report.Database.Tables.Location.LastIndexOf(".")+1); } CRViewer.ReportSource = report; ... |
|||
:
Нравится:
Не нравится:
|
|||
|
|
start [/forum/topic.php?fid=31&mobile=1&tid=1539097]: |
0ms |
get settings: |
9ms |
get forum list: |
12ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
36ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
24ms |
get tp. blocked users: |
1ms |
others: | 12ms |
total: | 114ms |
0 / 0 |