Focal Point
passing phrases to drill-down child reports

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9291035462

January 04, 2008, 04:16 PM
JohnB
passing phrases to drill-down child reports
I have a complex report where the text of the heading lines changes, based upon the time frame the report is to run for. For example, if the user chooses "custom", one of the heading lines will have the begin and end dates specified by the user. If the user chooses WTD, that heading line will say Week to Date for Fiscal Week __".

Being that the heading lines contain spaces, how do I pass them as parameters to the child reports? There are 3 dynamic heading lines which are in the parent report as:

HEADING
"&HEADING_LINE_1"
"&HEADING_LINE_2"
"&HEADING_LINE_3"
"Run Date: <+0>&DATEtMDYY <+0> "

How do I write the style sheet code to pass them?

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
January 04, 2008, 04:53 PM
FrankDutch
John

you can pass the amper variable to the child report by saying

TYPE=DATA, FOCEXEC=app/child.fex(HEADSTRING=&HEADING_LINE_1), $




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 04, 2008, 05:05 PM
JohnB
That didn't work, due to the embedded spaces, which is why I posted this. Enclosing the the text of &HEADING_LINE_1 in apostrophes didn't work right either.


WF 7.7.03, Windows 7, HTML, Excel, PDF
January 04, 2008, 05:15 PM
GinnyJakes
Can you pass the variable that tells you whether it is custom or WTD? You'd have to recalc the headings but you could put that common code in a -INCLUDE.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 04, 2008, 05:19 PM
FrankDutch
A good rule is always to make very short amper values. There is a limitation, the long names might bring more problems, so try to get used to the short names.
In stead of HEADING_LINE_1 try HL1.....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 04, 2008, 08:24 PM
susannah
john,
-SET &PASSHDR1= '''' | &HEADER_LINE_1 | '''' ;
focexed=fexname(HD1='&PASSHDR1' ...
but as all have warned, browsers have different tolerances for url lengths.
IE has a 2k limit..and it gets eaten up pretty quick...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 06, 2008, 08:04 PM
Piipster
quote:
Can you pass the variable that tells you whether it is custom or WTD? You'd have to recalc the headings but you could put that common code in a -INCLUDE.



I'm with Ginny. Pass a variable saying what type of heading it is and then derive the heading with Dialog Manager in the fex.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
January 06, 2008, 10:05 PM
susannah
I totally agree w/ FortWorth and Melbourne. Always the cleanest way.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 07, 2008, 03:18 AM
Tony A
I absolutely agree - totally. The first thing that I thought on reading the initial question was decode via an include.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 07, 2008, 05:57 AM
GamP
However, the next example does work fine in my environment (717):
-SET &HEADING_LINE_1='This is a line of text';
-SET &HEADING_LINE_2='This is yet another line of text';
-SET &HEADING_LINE_3='And this will then be the third line of text';

TABLE FILE CAR
SUM SEATS BY COUNTRY BY MODEL
HEADING
"&HEADING_LINE_1"
"&HEADING_LINE_2"
"&HEADING_LINE_3"
ON TABLE SET STYLE *
TYPE=DATA,
 FOCEXEC=SESSION/child.fex(\
 LINE1='&HEADING_LINE_1' \
 LINE2='&HEADING_LINE_2' \
 LINE3='&HEADING_LINE_3' \
), $
ENDSTYLE
END

My drilldown child.fex contains:
TABLE FILE CAR
SUM SEATS DCOST RCOST BY COUNTRY BY MODEL
HEADING
"&LINE1"
"&LINE2"
"&LINE3"
END

And everything just shows up fine.

Hope this helps.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
January 07, 2008, 01:12 PM
JohnB
RE: -INCLUDE
Ginny, -INCLUDE is a good idea, but I still believe there should be a way to use the drill-down parameters. Yes, I can easily pass a parameter which contains the time frame (DAILY, WTD, MTD, or CUSTOM).


RE: short variable names
Frank, I understand your point about variable name length. I'm from the other philosophy where I try to make variables, field names, and labels meaningful, so they are self-documenting as much as possible. I have run into error messages due to the lengths being too long, and this is easily remedied.


RE: -SET &PASSHDR1= '''' | &HEADER_LINE_1 | '''' ;
Susannah, this is a variation of what I had done. I had put the apostrophes into &HEADER_LINE_1, rather than as a second variable, causing the apostrophes to show up in the heading lines of the parent report. I'll give your approach a try! Thanks for the info on the 2K IE URL limit.


RE: Change the BLANKS to a character
Nifty! I like this, as it may have other uses in this project. Thank you, Tom.


Hey Piipster! How are you?!! I got laid off from IBI in Sept. 2006. How can I contact you privately?


RE: GamP
Nice.


WF 7.7.03, Windows 7, HTML, Excel, PDF
January 07, 2008, 01:19 PM
JohnB
Susannah, I tried your approach and still got apostrophes in the heading of the parent report.

I'll try one of the other methods posted.


WF 7.7.03, Windows 7, HTML, Excel, PDF
April 18, 2008, 03:36 PM
JohnB
When they upgraded the server, everything worked fine, and this problem ceased.


WF 7.7.03, Windows 7, HTML, Excel, PDF
April 18, 2008, 03:48 PM
JohnB
I'm wtih a different company now, using WebFOCUS 7.6.4, and they are doing development and production from applications created on
EDASERVE in Data Servers.

Similar to my orignal message, I need to pass phrases from parent to child via a drill down parameter. This time it's WHERE statements which may have one or more values enclosed in apostrophes. I can easily use Dialog Manager to create a variable which has the WHERE staement syntax, such as:

-SET &WHERE_ITEMS = 'WHERE RECONCILED EQ ' | '''NO''';

However, I can't get the apostrophes to pass to the child report. WebFOCUS accepts this as valid syntax for the parent, but doesn't like it when used by the chiled and gives the error message:

(FOC318) A FIELD FORMAT IS NOT ALLOWED IN -SET:

Any suggestions?

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
April 18, 2008, 04:16 PM
FrankDutch
I would pass only "yes" or "no" and then in your child report translate that to what you need.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

April 18, 2008, 04:51 PM
JohnB
That's a good idea, Frank.

The child report will be used by many parent reports, and the WHERE statements will vary with each parent.

I would like to keep the WHERE statement syntax with the parent reports, if possible. If I can't get a solution to this, you've given me the basis of a workaround.

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
April 18, 2008, 05:03 PM
FrankDutch
Well John my point of shorter variables is not a matter of philosophy but technical boundaries.
And your new question brings you an other, so try to avoid it.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

April 21, 2008, 06:12 AM
GamP
If it concerns keeping the wheres intact, would it be an idea to have three part sent as drilldown parameter in stead of one?
First part could then be the fieldname to test against, the second the operator (like EQ or NE or whatever is needed) and the third one being hte value to test against, without the quotes. In the child fex you could then reconstruct the where to be exactly what you need it to be.
Just my 2cts,


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
April 21, 2008, 08:54 AM
PBrightwell
I would agree with GamP and Frank, if it is a matter of repetive code create an -INCLUDE to decode the variables and put them together in a WHERE statement. Then use the -INCLUDE in the drill down programs.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes