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

Simple results in Crystal

Status
Not open for further replies.

phoward

IS-IT--Management
Jul 20, 2000
11
0
0
US
I am not trying to do anything terribly difficult here- I just want to reference information in a table, but not in the details field- here is what I am using for a formula:

if {LabTestDetail.TestName}='FISH RESULT'
then {LabTestDetail.RsltTechComment}
//else ''

My table is really simple- I dont need to repeat the data over and over, just a one time report from a table. Below is my table.

RecNum Accession SortOrder TestClass TestName RsltFlag Result
1 173958 900 Undefined Class FISH RESULT N NORMAL
1 173958 901 Undefined Class PHOTOMICROGRAPH_FISH N YES
1 173958 902 Undefined Class FISH_ADDCOMMENT N YES
1 173958 910 Undefined Class FISH_VOLUME N YES
1 173958 911 Undefined Class FISH_COLLECTION_FLUID N YES
1 173958 918 Undefined Class FISH_SIGNATURE_TECH N TEST
1 173958 919 Undefined Class FISH_SIGNATURE_DR N TEST
1 173958 921 Undefined Class FISH_OLDRESULT_1 N YES
1 173958 922 Undefined Class FISH_OLDACCESSION_1 N YES
1 173958 950 Undefined Class FISH_OLDRESULT_4 N YES

There is not much more too it. This works as long at it is the first result: FISH NORMAL and its comment. After that it doesnt work. I assume this is because the data is not looping like it does in the details field. How do I get it so I can put down the data? What else do I need?
 
Hi,
How do you want the data to display.
You are restricting it to just a record that has {LabTestDetail.TestName}='FISH RESULT' so only 1 record seems to match that..I also do not see a {LabTestDetail.RsltTechComment} field in the table info you posted.


It would be better to give us a sample of what output you want..

( Also Version, Datasource, Connection Method will help refine our answers)




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Data doesn't loop in the details, it is simply the sequential dump of the data, and you state "is because the data is not looping like it does in the details field", but not where you are displaying the data.

For best results post:

Crystal version
Database/version/connectivity used
Example data
Expected output

Less text descriptions and more technical information tend to get the solution.

-k
 
Well, if i use the formula

if {LabTestDetail.TestName}='FISH_VOLUME'
then {LabTestDetail.RsltTechComment}
//else ''

Nothing shows up, but if I use the formula as seen above in the previous post, it will. It doesn't appear to be cycling through the results - it hits the first one and stops. If i put it in the details field it works, but multiplies it by x20.

This report links to an access database that is generated by a larger database. The smaller database is generated for only one patient result, as seen above. All I am trying to do is some basic formatting. That table above is all the data I am working with.

I am working with crystal 9.
 
I just want it to shoot out data from the table so I can place it on a field and format it. I am a designer, so I am not trying to generate any 200 page report, just a one time report.

 
The LabTestDetail.RsltTechComment is in another part of the table- I just truncated the table so it would fit, and you could understand how it is formatted. It is a proper reference that works for the first example
 
If you're going to ignore questions posed, you're just wasting my time.

"where you are displaying the data"? In other words, where is this formula?

Think of the Crystal canvas as being similar to a query.

The details section is the select line, so it will display everything. If you have a grouping in the report, then a formula in the group header will display the first row of that group, conversely if it's in the group footer, it will show the last row for that grouping.

Stating that you just want to shoot out data means nothing, you have to supply meaningful technical information.

-k
 
Correct.

Let me put it this way -- I am not trying to create a table, just take the information from the database and place it on a page -- just format it in a meaningful way. You know, like graphic designers do. As far as I understand it, I have to put the data in something other than the details field so that it doesn't repeat, like a table. But I need to be able to grab the results and put it somewhere.
 
You don't answer questions, such as where you're placing this formula, the essence of your dilema, so how can anyone help you?

It sounds like you're new to Crystal, and perhaps databases in general so you'll be better served to answer questions and supply technical information rather than trying to state how you believe something should be done.

Again, data does NOT repeat in the Details section, it shows each row just once. Databases don't have information, they have ROWS (or records). I had originally asked that you supply example data and expected output, and you ignored that as well.

You might be better served hiring a consultant with an understanding of databases, reporting and basic problem solving skills.

-k
 
Hi,
OK, still very unclear as to what you want..
The formula you posted will restrict what data is returned ( BUT, do not place the formula itself on the report ( group or detail, no matter) - use it as a Record Selection formula then, if
{LabTestDetail.TestName}='FISH RESULT'
only that 1 record will be displayed in the details section..
Place whatever fields from that record you want to show there.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi again,
Small editing needed to my previous post:
When used as a record selection formula, your formula does not need ( and should not use)the If..Then..Else logic..

Insert the

{LabTestDetail.TestName}='FISH RESULT'

part as the Selection criteria..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top