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

Using Previous Values Calculated

Status
Not open for further replies.

sgurusha

Programmer
Jan 19, 2001
16
CA
Hi Folks:

Got an interesting issue. I'm using CR 8.5 Designer on Windows 2000. I'm accessing an Oracle 8.1 database.

I have a CR reports which counts the number of instances of a particular service type by week. Right now it is running in a cross-tab format report.

What I want to do is store those counts and compare them against another run of the report. The data is constantly being updated so each time the report is run the count changes. So, for example the first run maybe:

Service Type Week 1 Week 2 ......

A 10
B 20
C 30

Next week when I run the report, I want to show last week count plus todays count:

Service Type Week 1 Week 2 ......

A 10 20
B 20 9
C 30 5

Any suggestions? Thanks in advance.


Sunil W. Gurushanta
sgurusha@interlog.com

 
You can't do any calculations with the results of a cross-tab. You could build a manual cross-tab, which would allow this. See my FAQ on common formulas for more on how to build a manual cross-tab. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Hi Ken:

Understand what you are saying but I still don't see how I can show the differences between week 1 and week 2.

Can you elaborate further?

Thanks.


Sunil W. Gurushanta
sgurusha@interlog.com
 
You will have subtotals for week 1 and week 2 on the group footer. You write a formula that subtracts one subtotal from the other. It can go next to them on the GF. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Hi Ken:

So how do I stop Week 1 counts from changing?

Recall that everytime I run the report the counts are continuously being updated.

Thanks.


Sunil W. Gurushanta
sgurusha@interlog.com



 
Maybe I missed the point of the question.

If you look at the data today, can you tell which records are week1 and which are week2?
Are you saying that you only know what week1 is during week1?
Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Hi Ken:

You're on the right track.

This report is run weekly. Usually at the beginning of the week. It resets for the next month.

So, if we're at the beginning of a reporting month. The first time it is run we capture week 1.

For next week I want to preserve week 1 on the report, since that data will no longer be in the database and run the report to show week 1 and week 2.

The continues for the month until month end and then resets for the following month.

Hope this helps.

Thanks.


Sunil W. Gurushanta
sgurusha@interlog.com

 
You can't do this strictly in CR.

CR doesn't have the feature to 'preserve' the data. You may have to write the info to a holding table and then combine this with the current results for the report. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Hi Ken:

Can you use CR Designer to create a holding table and then use it in the report? Or, do I need to use CR Developer?

Thanks.


Sunil W. Gurushanta
sgurusha@interlog.com
 
CR designer comes in 3 editions.
Standard
Professional
Developer

All 3 editions can export to an ODBC table, but CR can't combine these tables into one. To truly manipulate tables you need an application written in something like VB.

The application doesn't have to run the reports, just get the table(s) ready. But, if you want to launch and manipulate reports from VB, you need the developer edition. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top