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

How to formulate in CR10 ?

Status
Not open for further replies.

mamba74fr

Technical User
Oct 31, 2004
12
GA
Hi ,

Anybody could help me to write the following statement in CR10

That was ma table content

Org.OrgID Org.Org Name Org.Course Org.Time
1145 MATH_DPT MATH 03/13/05
1146 PHYS_DPT PHYS 03/26/05
1147 BIOL_DPT BIOL 3/23/05
1149 MATH_DPT MATH 03/23/05


i want the result MATH et MATH_DPT in my page header in that format

Class1 Class2 Class3
Org.OrgID MATH_DPT
Org.Org Name
Org.Course MATH



i want to parameter ma date , write a function Extract and call that function in my report

Anybody could help me to translate my desires in CR10 formula ?


Header function should be like :
Function Extract(stringvar topic,stringvar res,datevar day,)

Body function should be like :
if {Org.Course}=topic and {Org.Date}=day then return(res)
else return("") ;


And execute the function :
Extract('MATH',{?d_date}, {Org.OrgID})


Thx !



 
Please don't create multiple threads on the same topic. I think you would be better off explaining what you are trying to do than asking for help with what you think will be the solution.

First, please explain your group structure. Having seen your earlier threads, it is unclear whether you expect to show multiple classes in one report, or just one. You also seem to be asking for something that will create a page heading, but what do you expect to show on each page? You have suggested that you want to use a date parameter, and yet it looks like you hope to show different dates depending on the class--which isn't how a discrete date parameter would work. So, again, please explain the purpose of the report, the report structure, etc., and I think you will get more useful responses.

-LB
 

It's like create a crosstab manually in using my function "Extract"

Any help ?
am i clear now ?, i hope you got it now?

 
I have never seen anything in crytal remotely close to your 'EXTRACT' function. Nor are there Header, Body or Footer 'functions' tht determine what gets on the report.

If you want certain data field on the report, drag it onto the report canvas. When you restrict the records that are passed to the report, you do this with a record selection formula. For example:

{Datefield} = Date(2005,8,19)

This will only return records with dates of 8/19/2005.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
i sorry if you are lost. For sure when we 're coding there is no Header, Body or Footer of a function. i mentioned those only to get a better idea of what could be my function from the start to the end.

And of course, 'EXTRACT' is the function i want to create even if there is a severe limitation in CR 8,8.5,9,10,11 .

But anywhere thank you a lot for your help.
I hava appreciated your prompt attitude

 
Hi,
CR limitations ( such as they are) do not seem to be what is involved here - your concept of Function seems to be at odds with Crystal terminology..
What, in non-programming terms, do you want CR to do ?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
i need to build a crosstab manually and use a function to extract some values by class1 , class2, class3 .i don't want to use the select record option from CR.
my table structure is like
table Org {OrgID , Org_Name , Org_Course ,Org_Time, Org_class}


I hope this time i'm clear, now !

 
You don't use functions is crystal to display field values, you just drag the field onto the report canvas like I said before.

You would use a function in crystal only to manipulate a field value. Such as @AvgMoSales={LastYearsSales}/12. In this example @AvgMoSales is a formula, and {LastYearsSales} is a database field.

Drag the field names you want onto the report canvas. If the raw data does not contain the result you want, write formula to get it like you want it, and drag those formulas on the report canvas.

Once you have that we will worry about record selection and grouping as a separate issue.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top