BusinessObjects Board

Pulling formulations in variables - Webi

I just reviewed the whole “Report Engine Java Developer Guide” (location of the Developer Guide is: https://www.sdn.sap.com/irj/boc/sdklibrary). And couldn’t locate any useful info on the variables --defined by variable editor-- used in a webi report (XI3.1).

However, when I open the .wid document in notepad, I am able to see the variable names. But it is little freaky, for example if my variable is named as varQty, it is placed in .wid doc as v + blank + a + blank + r + blank + …

And I am not able to see the formulation of the variable, or what I see is funky characters…

i.e, lets say

[varQty] = [measure-1]+[measure-2]

I cannot locate [measure-1]+[measure-2]. Based on my previous research, this information is only located in the .wid file, nowhere else…

it is crucial for me to locate [measure-1]+[measure-2] part. I already checked the source code of WID scanner tool, its no help. Using Report Engine in VB.NET, I can get tons of information about a given webi report, or can do alot of different operations, except this one…

Anyone ever tried to pull that information using SDK? if you could share that info, it would save my painfull days :frowning:

thanks

Mr.H.

Update: I just quickly reviewed the Business Objects Report Engine Java API document, and saw that there is “Interface VariableExpression” with getVariables() method which returns all variables available for the document, and getFormula() method which returns the formula this variable is based on. I couldn’t locate the interface and methods via SDK yet, but getting there I guess…


MrH :us: (BOB member since 2007-08-17)

Hi, i am interested in obtaining a value of a “Document variable” (which will be placed in some ReportCell).

To obtain “Document variable” expression from a ReportCell:

reportCell.getExpr().getName()

I can not find a function which will give value of this variable.

For FreeCell there is such function:

freeCell.getValue()

Please help. Thanks!


bsok (BOB member since 2009-01-26)

Is it possible to copy a report cell to a free cell as part of your code?


Nick Daniels :uk: (BOB member since 2002-08-15)

yes, it is possible:

FreeCell freeCell = reportCell.toFreeCell()

but the value of a freeCell will be variable expression of reportCell and NOT its value

Updated:
Does anybody have an idea how to obtain the value of a “Document variable”?


bsok (BOB member since 2009-01-26)

Hello,
Did you succed in getting the value of the variable.
regards
Rajesh


bhardwaj_rajesh (BOB member since 2009-07-17)

Hello, i obtain a value of a cell in a report using XMLViewer - it is not an elegant way way but it works. I just wanted to check if there is a value1 or value2 in a report so did like that:


			Report rep = doc.getReports().getItem("Report 1");
			XMLView xv = (XMLView) rep.getView(OutputFormatType.XML);
			if(xv.getContent().contains("value1"))
				return true;
			else
				return false;

Look here: https://bobj-board.org/t/135485


bsok (BOB member since 2009-01-26)

I need a solution in .net not in java :nopity:

MrH


MrH :us: (BOB member since 2007-08-17)