Quantcast
Channel: SCN : All Content - RESTful Web Services SDK
Viewing all articles
Browse latest Browse all 262

Unable to change report filter with restful api

$
0
0

Hello,

 

I would change a report filter. I start by reading the report structure calling url "/raylight/v1/documents/{documentId}/reports/{reportId}/specification" with GET method. I get the following xml document :

<REPORT rId="1" name="Rapport 1">     <PAGEDEF>         <MARGIN bottom="2835" top="2835" left="2835" right="2835" />         <RECORDS horizontal="20" vertical="100" />     </PAGEDEF>     <DATA>         <DATA_FILTER>               <WHERE>                   <FILTER key="[Code unit\303\251 (budget)]">                         <CONDITION operatorCondition="InList">                             <MEMBER>A0029</MEMBER>                         </CONDITION>                   </FILTER>               </WHERE>         </DATA_FILTER>     </DATA>     <PAGE_HEADER bId="2" />     <PAGE_BODY bId="1">         <ROW height="775" bottomPadding="0" />         <SECTION bId="14">               <DATA />               <AXIS>                   <AXIS_EXPR>=[Unit\303\251 (budget)]</AXIS_EXPR>               </AXIS>               <SBODY bookmark="yes">                   <ROW />                   <ROW>                         <CELL bId="15" class="ia-section-cell" x="600" y="500">                             <CONTENT>=[Unit\303\251 (budget)]</CONTENT>                         </CELL>                         <VTABLE bId="12" name="Bloc 1" x="638" y="1850"                             verticalAttachTo="15" verticalAttachType="bottom"                             horizontalAttachType="none">                             <AXIS>                                   <SORTS>                                       <SORT sign="asc" expr="=[Nom+Pr\303\251nom]" />                                   </SORTS>                                   <EXPRS>                                       <AXIS_EXPR>=[Matricule]</AXIS_EXPR>                                       <AXIS_EXPR>=[Nom+Pr\303\251nom]</AXIS_EXPR>                                       <AXIS_EXPR>=[Type de contrat]</AXIS_EXPR>                                   </EXPRS>                                   <HIDE />                                   <ALTCOLOR frequency="2" color="#f8fbfc" />                             </AXIS>                             <DATA />                             <COL width="5480" />                             <COL width="5705" />                             <COL width="7055" />                             <ROWGROUP type="header">                                   <TR height="567">                                       <TDCELL bId="6" width="5480" height="567" autofitHeight="yes"                                             autofitWidth="no" colspan="1" rowspan="1">                                             <CONTENT>=NomDe([Matricule])</CONTENT>                                       </TDCELL>                                       <TDCELL bId="9" width="5705" height="567" autofitHeight="yes"                                             autofitWidth="no" what="text" colspan="1" rowspan="1">                                             <CONTENT>=NomDe([Nom+Pr\303\251nom])</CONTENT>                                       </TDCELL>                                       <TDCELL bId="11" width="7055" height="1100"                                             autofitHeight="yes" autofitWidth="no" what="text" colspan="1"                                             rowspan="1">                                             <CONTENT>=NomDe([Type de contrat])</CONTENT>                                       </TDCELL>                                   </TR>                             </ROWGROUP>                             <ROWGROUP type="body">                                   <TR height="0">                                       <TDCELL bId="4" width="5480" autofitWidth="no" colspan="1"                                             rowspan="1">                                             <CONTENT>=[Matricule]</CONTENT>                                       </TDCELL>                                       <TDCELL bId="8" width="5705" autofitWidth="no" what="text"                                             colspan="1" rowspan="1">                                             <CONTENT>=[Nom+Pr\303\251nom]</CONTENT>                                       </TDCELL>                                       <TDCELL bId="10" width="7055" autofitWidth="no" what="text"                                             colspan="1" rowspan="1">                                             <CONTENT>=[Type de contrat]</CONTENT>                                       </TDCELL>                                   </TR>                             </ROWGROUP>                         </VTABLE>                   </ROW>               </SBODY>         </SECTION>         <ROW height="1500" />     </PAGE_BODY>     <PAGE_FOOTER bId="3" /></REPORT>

 

 

I change the xml document to specify the new filter

<REPORT name="Rapport 1" rId="1">          <PAGEDEF>                    <MARGIN bottom="2835" left="2835" right="2835" top="2835" />                    <RECORDS horizontal="20" vertical="100" />          </PAGEDEF>          <DATA>                    <DATA_FILTER>                              <WHERE>                                        <FILTER key="[Code unit\303\251 (budget)]">                                                  <CONDITION operatorCondition="Equal">                                                            <MEMBER>A0030</MEMBER>                                                  </CONDITION>                                        </FILTER>                              </WHERE>                    </DATA_FILTER>          </DATA>          <PAGE_HEADER bId="2" />
.....

 

 

and send it to the url "/raylight/v1/documents/{documentId}/reports/{reportId}/specification" with PUT method. The result is

 

 

<success>  <message>the report has not be changed</message></succes>

 

Why ?

 

Fred


Viewing all articles
Browse latest Browse all 262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>