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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Reports

Status
Not open for further replies.

metalteck

MIS
May 10, 2006
54
US
I have 3 reports that I do, and I would like to be able to put all of the reports into one summary. The first report calculates all unbilled charges greater than 0. The second report calculates all of the current balances less than 0 and the last one calcuates all total charges greater than 0. All of these reports are grouped by class. I unfortunately can not run these reports together, because end result does not come to what I have.

Is there a way I can create a report by using these three reports into one?
 
Hi,
Same datasource? Tables?

Can you further explain what is meant by:
I unfortunately can not run these reports together, because end result does not come to what I have.




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Yes, they are the same datasource, just different fields being filtered by. Here is the sql code for each code, and I'm using Crystal 8.5. For example, If I run the report with unbilled charges the result is 20million. If I run the report with charges <0, i get -700k. But if I run the reports together, by combing the filters into one report,
I only get 8,000.

I need the result to show as a spreadsheet by class.
ex.
Class Unbilled <0 >0
A 500,000 250 0
B 123,000 1000 1000

1. Unbilled Charges
SELECT
BADPLPP."LPACCT", BADPLPP."LPFC", BADPLPP."LPADT3", BADPLPP."LPPTYP", BADPLPP."LPCBAL", BADPLPP."LPUBAL", BADPLPP."LPPSTI", BADPLPP."LPPSTO"
FROM
"AS400"."BSYDTAA"."BADPLPP" BADPLPP
WHERE
BADPLPP."LPUBAL" > 0 AND
BADPLPP."LPADT3" = 6
ORDER BY
BADPLPP."LPFC" ASC,
BADPLPP."LPPTYP" ASC

2. Current Balance <0
SELECT
BADPLPP."LPACCT", BADPLPP."LPFC", BADPLPP."LPPTYP", BADPLPP."LPCBAL", BADPLPP."LPCHGS", BADPLPP."LPADJ", BADPLPP."LPPMTS", BADPLPP."LPPSTI", BADPLPP."LPPSTO"
FROM
"AS400"."BSYDTAA"."BADPLPP" BADPLPP
WHERE
BADPLPP."LPCBAL" < 0
ORDER BY
BADPLPP."LPFC" ASC

3. Total Charges >0
SELECT
BADPLPP."LPACCT", BADPLPP."LPFC", BADPLPP."LPLDD", BADPLPP."LPPTYP",
BSYMQTFC."QTFCD",
BPBSSAP."SACYC#", BPBSSAP."SABDT", BPBSSAP."SABL01", BPBSSAP."SABL02", BPBSSAP."SABL03", BPBSSAP."SABL04", BPBSSAP."SABL05", BPBSSAP."SABL06", BPBSSAP."SABL07", BPBSSAP."SACSTS"
FROM
("AS400"."BSYDTAA"."BADPLPP" BADPLPP INNER JOIN "AS400"."BSYDTAA"."BPBSSAP" BPBSSAP ON
BADPLPP."LPACCT" = BPBSSAP."SAACCT" AND
BADPLPP."LPHSP#" = BPBSSAP."SAHSP#")
INNER JOIN "AS400"."BSYDTAA"."BSYMQTFC" BSYMQTFC ON
BADPLPP."LPFC" = BSYMQTFC."QTKEY" AND
BADPLPP."LPHSP#" = BSYMQTFC."QTHSP#"
WHERE
BADPLPP."LPPTYP" = 'R' AND
BPBSSAP."SACSTS" = 'A'
ORDER BY
BADPLPP."LPFC" ASC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top