Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] formatting a double in DM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] formatting a double in DM
 Login/Join
 
Platinum Member
posted
I'm trying to do a subreport where a list of comments shows for a detail record if they're available. To do this, I'm SAVing some output, and looping through the records to display the main records of my report (it contains a Company and an Amount, among other things). Then based on the Company, if there are comments for the Company, I'm displaying a small subreport that generates HTMTABLE output. Everything works fine, but I'm having a problem formatting the Amount from the SAVE file.

The master file defines the Amount as D12.2C. My read looks like:
-READ SAVEFIL NOCLOSE &COMPANY.A50. &AMOUNT.A20.

When I show Amount, it's got the decimal but no commas. I've tried ATODBL(&AMOUNT,'&AMOUNT.LENGTH','D12.2C') but it removes the decimal and doesn't do commas. How can I work around this? Can I read from a HOLD file? If so, what's the -READ syntax?

This message has been edited. Last edited by: Kerry,


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
You READ syntax is perfectly in order. The fact that you don't see comma's is because the save does not put them in the file. The comma option is for display purposes only, it will not be ported to a normal hold (or save) file. This will be done with other format like doc or wp. Your holdfile will look a little bit different with either option, but it is considered to be a display format, so it will contain the comma's. I'm sure if you experiment a little with it, you'll find out the correct code to do what you need to do.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Mac,

I would do the opposite.
Since you are saving the output of the amount you could use COMPUTE and output the computed field
COMPUTE OUTAMAOUNT/A16=FTOA(AMOUNT, '(D12.2C)', 'A16');


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
Yes Danny, your solution to this looks like it is a better one to me too.
Never thought of doing it like this.

Mac - go with this!


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Excellent, I'll give that a shot. Thank you both.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] formatting a double in DM

Copyright © 1996-2020 Information Builders