Upload report unit via webservice in C# .net to jasperserver

前端 未结 1 1894
既然无缘
既然无缘 2020-12-16 06:59

I\'m trying to upload a new report unit to the jasperserver via the webservice from C# .net I\'ve successfully uploaded/created the report unit but when I click on the repo

相关标签:
1条回答
  • 2020-12-16 08:02

    I was missing a few tags: CREATE_REPORTUNIT_BOOLEAN, PROP_HAS_DATA, and PROP_PARENT_FOLDER.

    Below is the final request xml that allowed me to upload the report unit via the webservice. The C# that calls the service didn't change from the original question.

    <request operationName='put' locale='en'>
        <argument name='CREATE_REPORTUNIT_BOOLEAN'>true</argument>
        <resourceDescriptor name='barunit' wsType='reportUnit'
             uriString='/reports/bar/bar_files'
             isNew='true'>
          <label>Bar Unit</label>
          <description>This is a test</description>
          <resourceProperty name='PROP_PARENT_FOLDER'>
            <value>/reports/bar</value>
          </resourceProperty>
    
          <resourceDescriptor name='bar.jrxml' wsType='jrxml'
              uriString='/reports/bar/bar_files'
              isNew='true'>
            <label>Bar Report</label>
            <description>This is a test</description>
    
            <resourceProperty name='PROP_RU_IS_MAIN_REPORT'>
              <value>true</value>
            </resourceProperty>
            <resourceProperty name='PROP_HAS_DATA'>
              <value><![CDATA[true]]></value>
            </resourceProperty>
            <resourceProperty name='PROP_PARENT_FOLDER'>
              <value>/reports/testunit_files</value>
            </resourceProperty>
          </resourceDescriptor>
        </resourceDescriptor>
    </request>
    

    Hope that helps somebody out there!

    0 讨论(0)
提交回复
热议问题