How to add content fields to Legal Entity Details report template in Java

I am able to create Legal Audit Detail report template but getting error while adding content fields to it .I am using java ,could anyone help.

Best Answer

  • Attached is the Legal Entity Detail report template Java example client (also included is a text file of the HTTP JSON Request message for complete list of the Content Fields). You'd also need to download the Java Examples package to access the modified JSON library (JSONOrderedObject).

    dss2legalentitydetailreporttemplatesclient.zip

Answers

  • Have you reviewed the Java samples at:

    https://developers.thomsonreuters.com/elektron-data-solutions/datascope-select-rest-api/downloads

    yet?

    I just took a look at what is in there, and it seems to be missing the answer to your question too. While I do not have access to my Java system at this moment (and Java is not my primary language) I believe you need to modify the DSS2ReportTemplatesClient sample something like:

    JSONArray jsonArray = new JSONArray(new JSONTokener("{['Field1','Field2']}"));

  • You can use JSONArray and JSONObject to add the content fields:

    JSONArray contentFieldNamesArray = new JSONArray();

    JSONObject cfJSONObject = new JSONObject();
    cfJSONObject.put("FieldName", "Audit Source");
    cfJSONObject.put( "Format", JSONObject.NULL);
    contentFieldNamesArray.put(cfJSONObject);

    JSONObject cfJSONObject2 = new JSONObject();
    cfJSONObject2.put("FieldName", "Audit Modified Date");
    cfJSONObject2.put( "Format", JSONObject.NULL);
    contentFieldNamesArray.put(cfJSONObject2);

    JSONObject cfJSONObject3 = new JSONObject();
    cfJSONObject3.put("FieldName", "ID");
    cfJSONObject3.put( "Format", JSONObject.NULL);
    contentFieldNamesArray.put(cfJSONObject3);

    legalTemplateJSONObject.put("ContentFields", contentFieldNamesArray);

    (Attached is the full source file: dss2legalentityauditreporttemplatesclient.zip)

  • This sample has been added to the Java Code Examples package, available here.

  • Hi Susane thanks for the solution you have provided to my query,but i had resolved the issue but still thanks for the solution.Now i am facing issue in creating the schedule .I have tried a lot but I am not able to get through it.So it would be great if u could help me.

  • HI Susane:I have posted a question related to my query for schedule also you can check .

  • Hi Yadav, I had posted an example for creating a Schedule for the Legal Entity Report. Hope that'd help.