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] How calculate the sum for two tables

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How calculate the sum for two tables
 Login/Join
 
Gold member
posted
Hi All,

I am having two tables in one FEX file like below.

SQL SQLORA PREPARE SQLOUT FOR
-INCLUDE app/tshares_bal1.sql
END
TABLE FILE SQLOUT
PRINT
SEQUENCENUMBER
SHAREAMOUNT
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF OPEN
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END


SQL SQLORA PREPARE SQLOUT FOR
-INCLUDE app/tshares_prf.sql
END
TABLE FILE SQLOUT
PRINT
PROCESSDATE
AMOUNT
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF CLOSE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END

Now i need to calcualte the total of SHAREAMOUNT column of first table and AMOUNT column of second table and need to display this total at the end of second table.

How to solve this?
can anyone please help me?

Thanks in advance.......

This message has been edited. Last edited by: <Kathryn Henning>,


Web FOCUS 7.7.03
PDF
 
Posts: 69 | Registered: May 24, 2013Report This Post
Virtuoso
posted Hide Post
Many ways to skin a cat, but I would in this case create an union query on the SQL part.
Then you have all the data in on report.

Of course the fields need to have the same name and format. And you might want to add a resource code to the two parts.

Of course you also can do this after you selected the data with SQL
In that case you in fact create a 3th report With the sum of both data sets.

In that case I would put the 2 data sets first in 2 different hold files.

But I am sure you will come up with aditional questions.
To much to explane in one single answer.

How about some basic training.?




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
Gold member
posted Hide Post
Hi FrankDutch,

I am new to webfocus. I didn't got any basic training.

My two tables having different types of columns.
I will merge the two SQL queries into one.

After that how to seperate the datesets into two hold files and do the sum calculation.

I am doing this for PDF reports. Here one more problem, two tables should come in one page like appending one table after another.In this case your idea will work.

Can you please provide me some rough code in the form of steps.


Web FOCUS 7.7.03
PDF
 
Posts: 69 | Registered: May 24, 2013Report This Post
Virtuoso
posted Hide Post
Step one

Try to get some training

Step two

Study the databases that are mentioned in the manuals, like the CAR table. Many examples are made on that table

Step three

I would recommend to create masters for these database tables if you need to build reports more then once.
Then you can rename and reformat the fields so they are the same.
You can add a defined field to both tables like Tblname and give them a basic.
Now you can create a report based on these two tables as if it is one table
And you still have because of the table name a way to split the report in two separate subtotals and an overall total.

Step ...

Good luck..




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
Guru
posted Hide Post
Santu, I see you are new to the forums and focus in general. I also see several topics in a row with your name. Training is great and will save you a lot of time.

Also, you DO have time to read up on the documentation, trust me. Although the members of this forum are great and quick to respond, they have their work too. Sometimes you may not get a response for a couple of days. Looking up something in the documentation usually only takes a minute (especially if you are familiar).

We are here to help, not to do your work. When I started off, I didn't receive training off the bat either. Instead I toyed around, read the documentation, and read through many of the previous posts already in these forums that answered many of my questions. I didn't post a question until after several months in FOCUS.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Gold member
posted Hide Post
Sorry for this.

I will follow your path.

Thankyou............


Web FOCUS 7.7.03
PDF
 
Posts: 69 | Registered: May 24, 2013Report 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] How calculate the sum for two tables

Copyright © 1996-2020 Information Builders