AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 17.11.2009, 09:52   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Multiple RTC:
We know that Dynamics NAV classic client has very nice feature: we can start it with option ID=<zup file name>. In that way we can have many NAV shortcuts which open different db/companies.
However Role Tailored Client looks like only one shortcut in menu and always starts the same client connected to "last server, last db, last company".

But we can create shortcuts for every needed connection in similar way as in CC, just we need to use option: settings:<clientusersettings.config file>.
For example i want to have shortcut which always opens W1 db on server "a1", service "NAV W1", using port 7048 (not standard port). Then:
  • I search for default "clientusersettings.config" in default folder (usually it is C:Users...AppDataLocalMicrosoftMicrosoft NAV).
  • Copy it to somewhere - for example to NAV RTC folder and rename to for example "w1.config".
  • Modify settings file:
    • <add key="Server" value="a1" />
    • <add key="ServerInstance" value="NAV W1" />
    • <addkey="ServerPort" value="7048" />
  • Create shortcut: "C:Program Files<path to RTC>Microsoft.Dynamics.Nav.Client.exe" -settings:"C:Program Files<path to RTC>W1.config"
Now when i will click on this shortcut, it will try to connect to service tier described in config file.
And i can create as many shortcuts as i want and at the same time to have opened many RTC connected to different db.
Before use this shortcuts i must to create service tiers, but this is not current topic problem, it is described at Freddys Blog

How to run pages/reports from CC

During developing pages and SSRS reports in CC objects designer, usually we want to run it. However there are few issues:
- If we run page (nice feature in Dynamics NAV SP1), it will start last RTC session connection. I mean for example i just looked how page looks in db "w1" by run it from RTC, and now opened CC and designing page in db "UK", and, if i push run button in object designer, then NAV will open RTC and run page from company "w1" (but I'm expecting "UK"). This is because NAV CC has no information about "service tier" and just starts last RTC session.
- There are no possibilities "by default" to run RTC report from CC.

With my friends help i created little trick and can run page/report from CC from current connected db.
  1. I created table with fields:
    1. User ID Code 20 - user id which will run page/report (for example: gediminb)
    2. RTC Client exe Text 250 - path and name to RTC client exe file (for example: C:NAV RTCMicrosoft.Dynamics.NAV.Client.exe)
    3. Server Name Text 30 - NAV server name (where is service tier installed) (For example "DBServer")
    4. NAV Server Name Text 250 - NAV service tier name (for example: NAV W1)
    5. Settings path+name Text 250 - path and name of client user settings file (i described earlier) (for example: C:NAV RTCw1.config)
  2. I created form based on "Object" table, filtered pages and reports and under button i added code:
Session.RESET;
Session.SETRANGE("My Session",TRUE);
Session.FINDFIRST;


WITH DevUserSetup DO BEGIN
RESET;
GET(LoginMgt.ShortUserID(Session."User ID"));


TESTFIELD("Server Name");
TESTFIELD("RTC Client exe");
TESTFIELD("NAV Server Name");


IF DELCHR(DevUserSetup."Settings path+name")=''
THEN txtSettings := ''
ELSE
txtSettings:='-settings:"'+DevUserSetup."Settings path+name"+'"';


ShellString := '"' + "RTC Client exe" + '"';

IF Rec.Type=Rec.Type::Page THEN
ShellParam := '"DynamicsNAV://' + "Server Name" + '/' +
"NAV Server Name" + '/' + COMPANYNAME + '/' +
'RunPage?Page=' + FORMAT(Rec.ID) + '" '+txtSettings;
IF Rec.Type=Type::Report THEN
ShellParam := '"DynamicsNAV://' + "Server Name" + '/' +
"NAV Server Name" + '/' + COMPANYNAME + '/' +
'RunReport?Report=' + FORMAT(Rec.ID) + '" '+txtSettings;


END;

SHELL(ShellString,ShellParam);

----------------------------------------------------------------------

Here "DevUserSetup" is variable type rec and point to my previous created table.

So what does this code when i push button when cursor is on report 21? It creates string like: "c:NAV RTCMicrosoft.Dynamics.NAV.Client.exe" "DynamicsNAV://DBserver/NAV W1/CRONUS International Ltd./RunReport?Report=21" -settings:"c:NAV RTCW1.config" and run it from SHELL.
This will run RTC and opens report i want to see with data i want to look.
The same is if i push button when cursor is on page.

That's all
Special thanks to Martin Jordt Hansen

Gedas Busniauskas (gediminb)
Microsoft Customer Service and Support (CSS) EMEA



Источник: http://feedproxy.google.com/~r/Micro...m-diff-db.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:11.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.