Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Database field in a text box Post Reply Post New Topic
Author Message
mrr101001000
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 5
Quote mrr101001000 Replybullet Topic: Database field in a text box
    Posted: 09 Dec 2011 at 5:28am
Hello,
I am unable to figure out a simple issue, I am sure someone knows this one!

So I know how to put a database field in a report so when it is called on using a parameter field, it automatically fills in the data in the text box.

That looks something like this:

"Program: {program_number}"

Where everything in quotes is my text box, the "Program:" is my text and the "{program_number}" is my database field that automatically fills in.

This function works and will always fill in the program number that fits the parameters that are called out.

However, if there are in fact two programs that fit the parameters that are called out, I would like to have both of these show up.

If I use "Program: {program_number} {program_number}" only one program number shows up twice, which makes sense for how I laid that out.

Does anyone know how to make it so if two (or more) programs fit my parameter call out, these all appear in my text box after "Program:"

I am wanting a result that would look like

"Program: PROG01  PROG02  PROG03 (etc..)

Thank you in advance for your time and knowledge!!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 12 Dec 2011 at 3:30am
turning multiple rows into 1 row can be done only by a) subreport or b) in a group footer.
 
either way, the idea is the same
in the detail section you place a formula like:
shared stringvar oneLine;
 
if instr(oneLine, {program_number}) = 0 then
  oneLine := oneLine + " " + {program_number};
 
"" // will hide the output.
 
to display the value place a formula in the group footer(for example) like:
shared stringvar oneLine;
oneLine
 
HTH
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.