Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Wednesday, March 28, 2012

RMO: getting the agentid for AssignToAgent

Hello,

I'd like to assign a custom profile to a merge replication agent. The AssignToAgent() method takes the distribution db name and the agentID as an integer. Which method is used to get at this agentID? All I can find is the job ID in the subscription class.

Thanks!

Scott

You could try something like this

string distServerName = "mydistributionserver";
ServerConnection distServerConn = new ServerConnection(distServerName);
distServerConn.Connect();
AgentProfile logReaderAgentProfile = new AgentProfile("MyLogReader", distServerConn);
logReaderAgentProfile.Description = "My New LogReader Profile";
logReaderAgentProfile.AgentType = AgentType.LogReaderAgents; // change this to MergeAgents
logReaderAgentProfile.Create();
logReaderAgentProfile.CachePropertyChanges = true;
logReaderAgentProfile.MakeDefault();

// Set parameter values
logReaderAgentProfile.ChangeParameter("historyverboselevel", "1");
logReaderAgentProfile.ChangeParameter("logintimeout", "15");
logReaderAgentProfile.ChangeParameter("pollinginterval", "10");
logReaderAgentProfile.ChangeParameter("querytimeout", "1200");
logReaderAgentProfile.ChangeParameter("readbatchsize", "250");
logReaderAgentProfile.CommitPropertyChanges();

Hope this helps

Cheers

sql

Wednesday, March 21, 2012

RGB Function

Hi,
How can we use RGB function to have our custom colors for fields ? It's always displaying white color.
Else, please convey, if we cannot go beyong the stipulated colors provided in the combo.
Thanks,Color is a string. You need to convert RGB result into appropriate format:
=String.Format("#{0:x6}",RGB(35,1,96))
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"push" <push@.discussions.microsoft.com> wrote in message
news:FB8538AB-14CB-4B30-BC93-7F7EC6C7BDDF@.microsoft.com...
> Hi,
> How can we use RGB function to have our custom colors for fields ? It's
> always displaying white color.
> Else, please convey, if we cannot go beyong the stipulated colors provided
> in the combo.
> Thanks,

Tuesday, February 21, 2012

Returning ListChildren Name and Path

I am writting a custom web app that I need to get all available reports from the report server into an arraylist and then populate a drop down with that arraylist. I am getting back "myAppName.MyArrayName+ReportItem". I get this line for each available report in the dropdownlist but not the name or path...which I am requesting. What am I doing wrong? Does it have something to do with the dropdownlist capability? Please advise. Thanks so much!
CurtisKYou want to extend the ListItem that the drop down list uses to support your
CatalogItem types. This can be down by writing a few lines of code. For an
example of how this is done, see the FindRenderSave or RSExplorer sample
applications that ship with Reporting Services.
Bryan
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"CurtisK" <CurtisK@.discussions.microsoft.com> wrote in message
news:2FC2AECB-FE8A-4615-AD7D-5A724BA4FC9C@.microsoft.com...
> I am writting a custom web app that I need to get all available reports
from the report server into an arraylist and then populate a drop down with
that arraylist. I am getting back "myAppName.MyArrayName+ReportItem". I get
this line for each available report in the dropdownlist but not the name or
path...which I am requesting. What am I doing wrong? Does it have something
to do with the dropdownlist capability? Please advise. Thanks so much!
> CurtisK