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!

Multiple Field values displayed in one field

Status
Not open for further replies.

tinyredtornado

Technical User
Nov 19, 2007
8
US

I need to display multiple fields in one column. I would just stack them on top of each other but one or all of may be selected to be shown; the selection is through a webpage that the developer has built.
I generally create a "database" to create a report template from an excel sheet; the developer tells me the best way to emulate what is being spit out by the database is to create a column in excel for each possible field that could be displayed.

Is there any easy way to format this? I am totally stuck.
(Those of you familiar with my stupid questions should know the class is in January and I promise to listen very hard and never bother you guys again with such simple stuff.)
Thank you very very much
 
Assuming all of them were selected to be shown, or most of them were selected to be shown, what would you want it to look like?

Don't worry about 'simple'. We all started there at some point. And simple isn't always simple.
 
If you put each field in a separate detail section, one on top of the other, you can format each detail section to "suppress blank section". Then if the field is not selected, the section will not appear.

-LB
 
Thanks for replying, I really appreciate it.

Here's the fun detail I left out.
This is a communications log report- a weekly printout of all communications entries recorded on the website.

So it looks like this
name
date
things discussed
a[] b[] c[]
type of meeting
phone[] visit[] Company Visit[] Other Visit[] Email[] IM[]
subject
notes
resolved?(boolean)

if it were one entry per report I could totally do the seperate detail thing LB, but can I do it when I have say 10 entries for the week, each choosing a different combination of those checkboxes without having 10 columns which will be blank in some areas? They can choose one checkbox, or two, or all of them. Although of course likely it'll just be 2 types of meeting at the most (if someones there and another person is on the phone I guess). However they might choose all 3 a, b, and c.
I was thinking-
Is it possible to create a text object, dump all the fields in and suppress within the field? I haven't tried it yet but that was my next idea.
Again, I really really appreciate the input.

I sure hope you both get exactly what you want for Christmas this year for helping me :)

 
I believe you can do the text object trick. And it sounds like it gets you there in a pretty easy fashion.

There's a way with formulas too; you build a formula that runs similar to this:

Code:
local stringvar output;

//first see if the first value is present
output:=
(if isnull(fieldA) or fieldA=""
then ""
else "a[]" );

//Then if b is present, then we add it to the variable
output:=output+
(if isnull(fieldB) or fieldB=""
then ""    
else " b[]");

//Then we treat c like we treated b
output:=output+
(if  isnull(fieldC) or fieldC=""
then " c[]"
else "");


//Finally we Output
trim(output);
You'll have to adjust the conditions based on your situation.

But if your way works (and I believe it does), do that because it is easier.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top