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     [SOLVED] Calculating SUM for an Integer data type

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Calculating SUM for an Integer data type
 Login/Join
 
Member
posted
I am trying to add up the amount values and display that in the footer. The amount value is an SQLOUT output from Postgres and is of I11 format

-* amount                 E11           I11


I tried converting it into Packed Decimal using ITOPACK but ran across syntax errors. What I want to eventually do is calculate the sum and then display that in the report footer as follows

  
MAINFOOTER/A122 = 'TRANSACTIONS    '| DATE | AMOUNT;


Where can I exactly carry out the calculation and display it? (in place of AMOUNT in the above line) I tried doing a SUM(amount) but it complains that it cannot understand the expression

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 2012Report This Post
Virtuoso
posted Hide Post
Did you get som basic training. Got any documentation?

Do you know how to build a basic report on a database.
What was the code you tried and what exactly was the error?
There is so much , but where can we start....




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

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
WebFOCUS doesn't do implicit type casts, so you can't just concatenate alpha and numeric values like that. You'll first have to convert the numeric values to alphanumeric, for example using EDIT or FPRINT.

What are you trying to achieve by converting that integer into packed decimal?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Member
posted Hide Post
Hi guys,

sorry for the delay. figured a way out.

I was thinking converting to packed decimal might work for sum but i can do it using integer. simply by creating a define and then reading it

Something along the lines of


TABLE FILE CITYLINKHOLD
SUM amount/I9L
ON TABLE SAVE AS SAVE1
END
-RUN

-READ SAVE1 &SUMVALUE.A9.
-RUN

  


Still getting use to the focus language! will get there soon.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 2012Report 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     [SOLVED] Calculating SUM for an Integer data type

Copyright © 1996-2020 Information Builders