Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Pass user Text to the Fex Using a Text Area to use in Heading
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Pass user Text to the Fex Using a Text Area to use in Heading
 Login/Join
 
Gold member
posted
Hi Experts,

I am trying to create Launch Page on which i have given 2 Text Areas to the Users (Heading Notes and Footing Notes). I would be using the text typed in them in an ahtml report's SUBHEAD and SUBFOOT.
I am pre-populating the Heading Notes Text Area using a javascript function, What text should be displayed is being decided on selection of Report name and Language.
Using below code (I used \n because i want below 2 different lines :
else if ((document.getElementById('combobox1').value == 'pi') && (document.getElementById('combobox2').value == 'en'))
{
document.getElementById('textarea1').value = '" Private Equity Relationships Established as at September 30, 2017"\n' + '"All Figures as at September 30, 2017 (except where footnoted)"';
}


I have format the text with the Double Quotes so that this can be mapped to a Dialog Manager variable and i can directly use it in the SUBHEAD section.

When i pass this variable in the SUBHEAD, only the First line is getting Printed and rest of the lines are not being picked up.

However when i try to -TYPE &HEAD, it gives:

"Private Equity Relationships Established as at September 30, 2017" "All Figures as at September 30, 2017 (except where footnoted)"

I cannot attach the pictures to show what's happening, Can you think of a way i can achieve this and Create the Heading on the Fly using User input?

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
 
Posts: 54 | Location: Toronto, Ontario | Registered: May 15, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
« \n » is only recognized by the HTML not in Focus SUBHEAD, so if you still want to proceed that way, I suggest that you create 2 DM variable that will be passed to your report.

First var for first SUBHEAD line
Second var for second SUHEAD line

Also you should not need to include the double quotes.


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2095 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi MartinY,

Thanks for your reply, However this is One Example, Number of Subhead Lines can change from 2 to 8 as i am giving user a Text Area to input whatever he wants to see in the Subhead, How can i preserve the formatting?

I am passing this text in the On TABLE SUBHEAD.
Can you think of a way by which i can achieve this?

Also each line in the heading should have Double Quotes, i can use use "&HEAD.EVAL" though.


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
 
Posts: 54 | Location: Toronto, Ontario | Registered: May 15, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
How would you know how many lines you (should) have ?


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2095 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Master
posted Hide Post
A trick you could use is when the user click the run button.

1. using javascript capture the value in a variable.
2. copy the it into a new variable replacing the "\n" with a
"</1>"

3 set the input box to this new value.
4. Send it to WebFOCUS
5. Set the input back to the first variable, thus restoring what the user typed.




Scott

 
Posts: 862 | Registered: May 24, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
This works for me in WF8201.

-SET &HEAD = '"Heading 1" "Heading 2" "Heading 3"' ;
-SET &HEAD = REPLACE(&HEAD, '" "', '"'|CHAR(13)|'"');
 TABLE FILE GGSALES
 &HEAD
 SUM UNITS 
 BY REGION
 END 
In older releases you will have to use functions STRREP() and HEXBYT().


WF 8.2.03
Win10 / IE11
AHTML EXL2K PDF COMT WP ZIP
 
Posts: 134 | Registered: October 19, 2010Reply With QuoteReport This Post
Gold member
posted Hide Post
Thank you Gurus for your inputs.
@dbeagan: as i am currently on 8.0.8 (used 8201 in last organization Wink ) i used STRREP and HEXBYT() to achieve the same, I have used ~ as a delimiter and instructed the user to use this wherever they need a new line in there text.
I'll sure keep in mind the REPLACE Function for future.


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
 
Posts: 54 | Location: Toronto, Ontario | Registered: May 15, 2014Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Pass user Text to the Fex Using a Text Area to use in Heading

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.