Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Data from two reports

Status
Not open for further replies.

dasiga222

IS-IT--Management
Sep 22, 2003
68
US
Hi

I am using Crystal Reports 10

I am having two reports for discussion

I am using a report which has the fields
employee number , employee name location, division and Bonus

There is another report which has the fields
employee number , employee name location, division and Base salary

For a given employee the total salary is the ( Base Salary + Bonus )
But both the fields are in two different reports
Now my aim is to add the Bonus to the Base Salary
which are in two different reports

All the other fields employee number , employee name location, division are exactly the same in both the reports

For example an Employee with emp no 10 has bonus of 100 dollars in one report
and in another report the same employee with emp no 10 has a base salary of 1000 dollars

then the total salary of that employee with emp no 10
is 1000 + 100 = 1100 dollars


Both the reports contain equal number of records but there are almost 1000 records in both reports

How can I do it
Is there a way I can share values from two reports
using array variables ?

Thanks



 
Hi,
It is not important how many reports there are, but rather, how many database tables are involved..If the datasource table has both salary and bonus for each employee, you can create a formula to add them together; If in different tables, then use a view to join them and do as above, or join them in Crystal ( by emp no )and then add the 2 fields in a formula.

[profile]
 
Both the reports are from 2 different flat files

Bonus.csv and Employee csv

Again the values ..Salary and Bonus ..which are displayed are again group values and not individual values

The values in the flat files are weekly values
I am grouping them together to get monthly values

It is the same case with both the reports
Hence if the total montly base sallary is 1000 dollars
the total bonus is 100 dollars

Then the total salary got my the employee
is
1000 + 100 = 1100 dollars

Could you please help

Thanks
 
I agree with Turkbear. Click on Database-> visual Linking on both reports. Odds are they both use the same tables with maybe the Bonus table that needs to be outer joined.

I would make a copy of the Base Salary report and worked with the copy to avoid damaging the original and add the bonus piece from the Bonus report.

-LW
 
Hi

Thanks both Wichitakid and Turkishbear for your suggestions
Actually I need to get the montly group totals from the bonus report to be shared to the basic salary report

I could not just dump in the individual values because
There are individual formulae which are governing for calucalting the values in the both reports respectively

Once the monthly groupings are done from the weekly values (ie the montly bonus and the montly base salary )... these two values have to be addded together .

If I just add ...them by the individual fields by groupings then the intermittent calucalations are lost

I need to make calcualtions in both the reports (monthly bonus and monthly base salary ) and then .. I need to add them together

Could you please help

Thanks
 
csv files are got from main frames .. I am not aware of the making for the csv files

There are certain conditions in the bonus report like

if montly bonus < 25 then
montly bonus = 25
else montly bonus

if montly bonus > 500 then
montly bonus = 500 - .16 * montly bonus
else montly bonus

These calcalations must be done in the individual report
before the values are beoing shared on to the base salary report

I could not directly join the two reports by their fields because the under lying formulae are lost
Once the calcaultions are done in the indidual reports
The need to be added up

All the other fields like divno, empno, empname remain the same in both reports

Is there a way I can pass the bonus as an array of shared values

Could you please suggest
Thanks
 
What kind of database is on the main frame?

If you can access the database through your PC, then you should be able to access it through Crystal instead of using csv files. That is the beauty of Crystal Reports.

-LW
 
Hi Wichitakid

I am not aware of the data base in the main frames
All that I get from my manager are the csv flat files with data
I would be building the report from these flat files

I wish I could give information on this . But my knowledge on this limited . I aplologize for that

Can we pass the multiple values from one report to the other ....using Crystal reports itself ?
Can some array values be possible ?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top