Forum

This content is now out of date.

Visit Our Community

How can i programmatically create a report category in c#

There are guides that explain how to create modify and delete users or clients but i cannot figure out/find any guides that explain how to create report categories through c#.
To clarify i am currently using functions from the guide_integration_v5.1
to do things such as

ex: create a client organisation

AdministrationServiceResponse asrp = null;
AdministrationServiceRequest asr = new AdministrationServiceRequest();
AdministrationServiceClient asc = new AdministrationServiceClient(new BasicHttpBinding(), new EndpointAddress(server));
AdministrationClientOrg aco = new AdministrationClientOrg();

aco.clientName = toBeCreatedClientName;
aco.clientReferenceId = string.Format("{0}" ,toBeCreatedClientReferenceId);
aco.timeZoneCode = toBeCreatedClientTimeZoneCode;
aco.defaultOrg = false;

asr.loginId = userLoginId;
asr.password = userPassword;
asr.orgId = userOrgId;

asr.function = "CREATECLIENT";
asr.client = aco;

asrp = asc.remoteAdministrationCall(asr);

Console.WriteLine(asrp.statusCode);
HandelErrorCode("CREATECLIENT", asrp);
Console.ReadLine();

I am trying to create report categories in a similar way but there seem to be no functions that will do this in any of the API's i have looked at. An explanation of how i could do this and or an example would be extremely helpful.
Hi,

the short answer is no, currently it is not possible to create content in webservices. However, just recently the ability to import content into webservices has been implemented, so this might help you although to use this you would have to write some code to create the content in XML so that it could then be imported.

Regards,
David