cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a table and adding columns in webi report using restful 4.2

Former Member
0 Kudos

Hi,

Can any one let me know about how to create a table and adding objects as columns to it using restful?

Thanks in advance

Nirmal

Accepted Solutions (1)

Accepted Solutions (1)

former_member197386
Active Contributor
0 Kudos

Hello Nirmal,

There is a section about creating "report element" in the documentation. That should help you to build a fresh table and populate columns.

Regards,

Anthony

Former Member
0 Kudos

getting this error while updating the structure of the report

<error>

    <error_code>WSR 00102</error_code>

    <message>Illegal argument ("Cannot parse the axis formula =[Customer]. (Error: RWI 00650)")</message>

</error>

I am not sure on what would be the fix for this.

former_member197386
Active Contributor
0 Kudos

Hello,

Could you copy/paste the payload you sent?

There is probably an issue with xml format of the body request.

Anthony

Former Member
0 Kudos

Process am following as below


1.create query specification with resultobjects dynamically

2.save document

3create vtable for the added resultobjects in query specification

4.save document.


am getting below error while trying to update vtable at step 3

while trying to store to index -1 of an int array with length 2, loaded from field com.businessobjects.rebean.wi.toolbox.impl.lightreportstructure.parser.PositionManager.cellSpans of an object loaded from local variable 'this'

Any ideas for this error?

daniel_paulsen
Active Contributor
0 Kudos

Hi Nirmal,

Can you post the payload of the VTable you are adding as well as a full stack trace of the error being returned?

Thanks,

Dan

Former Member
0 Kudos

Hi Daniel,

details as below


Query specification creation

<?xml version="1.0" encoding="UTF-8"?>

<queryspec:QuerySpec xmlns:queryspec="http://com.sap.sl.queryspec" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="17" dataProviderId="DP0">

   <queryParameters>

      <duplicatedRowsProperty activated="true" value="true" />

      <maxRetrievalTimeInSecondsProperty value="0" />

      <maxRowsRetrievedProperty value="0" />

      <removeEmptyRowsProperty activated="true" value="true" />

      <allowOtherUserToEditQueryProperty activated="true" value="true" />

      <resetContextOnRefreshProperty activated="true" value="true" />

      <stripQueryProperty />

      <useBexQueryDefaultValue activated="true" value="true" />

   </queryParameters>

   <queriesTree xsi:type="queryspec:QueryOperatorNode" id="1" queryOperator="Union">

      <children xsi:type="queryspec:QueryDataNode">

         <bOQuery name="Combined Query 1" identifier="2">

            <resultObjects identifier="DS0.DO5e1" name="Detail Loss Location" />

            <resultObjects identifier="DS0.DO217" name="Accident Description Corp Code" />

            <resultObjects identifier="DS0.DO5d7" name="NCCI Nature of Injury" />

            <conditionPart />

         </bOQuery>

      </children>

      <propertyBag key="DUPLICATED_ROWS_UNDEFINED_VALUE" value="-1" />

      <propertyBag key="RESET_CONTEXT_ON_REFRESH_UNDEFINED_VALUE" value="-1" />

      <propertyBag key="ALLOW_THE_USER_TO_EDIT_QUERY_UNDEFINED_VALUE" value="-1" />

   </queriesTree>

</queryspec:QuerySpec>

success message after save :

<success>

    <message>The resource of type "Data provider" with identifier "DP0" has been successfully updated.</message>

    <id>DP0</id>

</success>

vtable creation

<?xml version="1.0" encoding="UTF-8"?>

<REPORT rId="1005" name=" Report Designer Current Summary Report" drillActivated="false" outputInDrill="false">

   <PAGEDEF>

      <FORMAT name="A4" orientation="portrait" />

      <MARGIN bottom="2835" top="2835" left="2835" right="2835" />

   </PAGEDEF>

   <PAGE_HEADER height="1800" />

   <PAGE_BODY>

      <CELL name="test report 555" verticalOnePage="yes" horizontalOnePage="yes" x="7425" y="450" width="15075" height="1575" autofitHeight="no" autofitWidth="no" leftPadding="37" rigthPadding="37" bottomPadding="37" topPadding="37" what="text">

         <CONTENT>test report 555</CONTENT>

      </CELL>

      <VTABLE name="Block Result" x="1425" y="5325" repeatHeaderVertically="true">

         <AXIS>

            <EXPRS>

               <AXIS_EXPR>=NameOf([Detail Loss Location])</AXIS_EXPR>

               <AXIS_EXPR>=NameOf([Accident Description Corp Code])</AXIS_EXPR>

               <AXIS_EXPR>=NameOf([NCCI Nature of Injury])</AXIS_EXPR>

            </EXPRS>

            <HIDE />

            <ALTCOLOR frequency="2" color="#f0f0f4" />

         </AXIS>

         <DATA />

         <PROPERTIES>

            <PROPERTY name="multiAlias" value="true" />

         </PROPERTIES>

         <COL width="0" />

         <COL width="0" />

         <ROWGROUP type="header">

            <TR height="0">

               <TDCELL width="4050" height="900" autofitHeight="no" autofitWidth="no" leftPadding="75" rigthPadding="75" bottomPadding="75" topPadding="75" what="text">

                  <CONTENT>=NameOf([Accident / Injury].[Detail Loss Location])</CONTENT>

               </TDCELL>

               <TDCELL width="4050" height="900" autofitHeight="no" autofitWidth="no" leftPadding="75" rigthPadding="75" bottomPadding="75" topPadding="75" what="text">

                  <CONTENT>=NameOf([Accident / Injury].[Accident Description Corp Code])</CONTENT>

               </TDCELL>

               <TDCELL width="4050" height="900" autofitHeight="no" autofitWidth="no" leftPadding="75" rigthPadding="75" bottomPadding="75" topPadding="75" what="text">

                  <CONTENT>=NameOf([Accident / Injury].[NCCI Nature of Injury])</CONTENT>

               </TDCELL>

            </TR>

         </ROWGROUP>

         <ROWGROUP type="body">

            <TR height="0">

               <TDCELL width="4050" height="900" autofitHeight="no" autofitWidth="no" leftPadding="75" rigthPadding="75" bottomPadding="75" topPadding="75" what="text">

                  <CONTENT>=[Accident / Injury].[Detail Loss Location]</CONTENT>

               </TDCELL>

               <TDCELL width="4050" height="900" autofitHeight="no" autofitWidth="no" leftPadding="75" rigthPadding="75" bottomPadding="75" topPadding="75" what="text">

                  <CONTENT>=[Accident / Injury].[Accident Description Corp Code]</CONTENT>

               </TDCELL>

               <TDCELL width="4050" height="900" autofitHeight="no" autofitWidth="no" leftPadding="75" rigthPadding="75" bottomPadding="75" topPadding="75" what="text">

                  <CONTENT>=[Accident / Injury].[NCCI Nature of Injury]</CONTENT>

               </TDCELL>

            </TR>

         </ROWGROUP>

      </VTABLE>

   </PAGE_BODY>

   <PAGE_FOOTER height="1800" />

</REPORT>

error message:

<error_code>WSR 00999</error_code>

    <message>Internal error ("while trying to store to index -1 of an int array with length 2, loaded from field com.businessobjects.rebean.wi.toolbox.impl.lightreportstructure.parser.PositionManager.cellSpans of an object loaded from local variable 'this'")</message>

</error>

daniel_paulsen
Active Contributor
0 Kudos

for an initial guess, I think you are defining a two column table but adding three objects.

...

        </PROPERTIES>

         <COL width="0" />

         <COL width="0" />

         <ROWGROUP type="header">

...

try adding a third column to the specification:

...

        </PROPERTIES>

         <COL width="0" />

         <COL width="0" />

         <COL width="0" />

        <ROWGROUP type="header">

...

Dan

Former Member
0 Kudos

Thanks Daniel. Its working now after the modification by adding <COL> tag

Answers (0)