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!

Is there any way to display your results horizontally?

Status
Not open for further replies.

axsom1

Technical User
Feb 27, 2001
67
US
Im running CR8 and am having a problem. I was given a template of what this form is to look like, I'm new to CR completely and the criteria is for the report to look like this:
Medical Condition: [pat_med_cond] [pat_med_cond] ....

rather than how its displayed now:

Medical Condition: [pat_med_cond]
[pat_med_cond]
............

Any help would be great, wasnt sure if its a simple formula I need to write or if its even possible. Spinning my wheels and unfortunately no one in the office knows CR!!

Thanks
John
 
John,
Assuming you need to show all medical conditions for
each Patient, declare and reset a global String
variable (MyString) in the group header for each patient
(or more probably for each patient event).

In the detail section, declare and set the value of the same global variable to something like:

MyString = MyString + " " + {pat_med_condition}

Use the Group Footer to display the Patient name
and the String Variable. You'll end up with a space
before the start of the list of conditions. In most cases this would not be a problem, but if it is, it's quite
easy to avoid or remove it.

By the way, Sybase has a nifty LIST aggregate function
that can do this using simple SQL.

hth,
- Ido
 
Ido is right, but he has a type in the formula. It needs a colon before the equal sign.

MyString := MyString + " " + {pat_med_condition}


The reset would be:

WhilePrintingRecords;
StringVar MyString := '' Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Ken,

That depends on what Syntax is being used.

You are assuming he is not using Basic syntax.

Cheers,
- Ido
 
You are correct. I always assume the default settings unless they specify differently. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks for the input!! I dont want to sound like a boob but I still havent a clue how to begin. I'm running on my fourth day of actually working in the software. :) Thanks again for your help

John

Oh yeah, I'm using crystal syntax.
 
Insert|Formula brings up the Field Explorer. Right click on Formula Fields, and pick New...
Pick your favorite name for the formula, and the formula text in the editor and save and exit from the formula editor.
MyString := MyString + " " + {table.pat_med_condition}
Your formula will appear in the Field Explorer under your favorite name, and just drag it into the group footer for patient.
Do the same thing with the reset formula Ken mentioned, only put it in the group header for patient. Malcolm
 
To be safe, both formulas should start with the following first line:

WhilePrintingRecords; Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks again....Im trying to learn this on the fly and didnt see the StringVar operator. Sure helps when you use the right one huh! :) Now its off to figure out why my web reporting wont work. Fun Fun!! Thanks again....saved me alot of headache.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top