Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: Database field in a text box
Author
Message
mrr101001000
Newbie
Joined: 08 Dec 2011
Online Status: Offline
Posts: 5
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 Logged
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
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 Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
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
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.