|
-
Mar 4th, 2004, 04:48 PM
#1
Thread Starter
Fanatic Member
crystal reports
If you have used Crystal Reports and know how to write formulas please help me out. I don't know how to do what I need it to do and it needs to be done by tomorrow! I am really stressed out!
I just need help writing a few formulas in either crystal syntax or basic syntax..
The Crystal reports Help, is not much help. I can't find any good online resources.
Please IM (AIM) me directly if possible at: Nickeypoo01 or just reply to this forum saying that you know how to write formulas and I will contact you.
Thanks!
Last edited by nkad; Mar 4th, 2004 at 05:26 PM.
-
Mar 4th, 2004, 06:19 PM
#2
I have written a few Crystal formulas in my life.
-
Mar 4th, 2004, 08:02 PM
#3
Thread Starter
Fanatic Member
Ok, well basically what I need to make is a few different formulas that will be used in a bar chart. I need each formula to count the number of records ( within the record selection formula ) that meet a certain criteria.
For example, lest say my database layout looks like the following;
Code:
Name Data Type
-----------------------------------
ID AutoNumber
Last_Name Text
Employed YesNo
ReceivingAssistance YesNo
I need a few formulas that will
1.) Count the number of records in which Employed = Yes and ReceivingAssistance = Yes
2.) Count the number of records in which Employeed = Yes and ReceivingAssistance = No
The Record Selection formula is set to a date range in which I want to totals to come from.
These will then be used to graph the results on a bar chart.
------------------------------------------------
Apart from this I was wondering if you knew how I could create a formula to count the number of records that fall between specific times in a DateTime field. I will have to create several different formulas on my report for different Time ranges.
I really do appreciate any help or advice that you give. Thank you so much!
-
Mar 4th, 2004, 08:43 PM
#4
What version of Crystal? If it isn't the free version 4.6 that comes with VB then its easy. Just create a "Running Total" for each count required.
A running total has three sections, with which to set options
1) The Operation - ie Sum, Count, Max etc..
2) When to perform the operation - ie all records, when the group changes or based on a formula. For your case choose formula and enter the criteria - ie for # 1
{tablename.Employed=True} And {tablename.ReceivingAssistance = True}
3) When to Reset the running total - ie never, when the group changes or use a formula.
Once you have created them you can use them anywhere on your report.
The only thing I don't know is if you can use these on a Chart. I don't have Crystal on this PC so cannot check. But try it out and see. It may depend on when you print the Chart.
-
Mar 4th, 2004, 09:18 PM
#5
Thread Starter
Fanatic Member
I will try that. I am using version 8.5
-
Mar 4th, 2004, 09:27 PM
#6
Thread Starter
Fanatic Member
Ok i am creating a new running total and in the formula editor i put
Edited:
Code:
{JOBSURVEY.Employed = 'Yes'}and {JOBSURVEY.RecievingPublicAssistance = 'Yes'}
but when i try to save it i get the message "There is an error in the formula, do you want to save it anyway?"
What is the error?
Thanks
-
Mar 4th, 2004, 09:38 PM
#7
Oops my mistake. Crystal requires the fields to be wrapped in braces, not the the value.
{JOBSURVEY.Employed} = 'Yes' And {JOBSURVEY.RecievingPublicAssistance} = 'Yes'
If your database fields are Yes/No fields you may need to use
{JOBSURVEY.Employed} = True And {JOBSURVEY.RecievingPublicAssistance} = True
Actually, just double click on the field in the list - Crystal will place it in the formula editor for you.
-
Mar 4th, 2004, 09:43 PM
#8
Thread Starter
Fanatic Member
Yap that works, thanks.. I have one further question regarding SQL Expression fields. Can i basically write an entire select clause and have crystal preform the request? like SELECT field1, field2, FROM table WHERE field1 = 'Yes'
?
-
Mar 4th, 2004, 09:59 PM
#9
Thread Starter
Fanatic Member
Ok i am in the Chart Expert , by default the Layout of set to Advanced but I am wondering why or how I can group different calculations togeather. I know i can make this damn chart in Microsoft Excel but it seems like so much of a damn challange to even get something usefull in Crystal.. Why will the Chart Expert never let me select Group as the Chart layout
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|