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

Display details in 2 columns 2

Status
Not open for further replies.

guitardave78

Programmer
Sep 5, 2001
1,294
GB
hi there
I got a db that has several fields, and I need them to display on a report in 2 columns, based on wether they have a particular value in one of the fields.
IE
if the value is BKUB it is displayed on left and if it is WFC it displays on right
 
Hi guitardave78

Insert two unbound fields into your report, side-by-side, lined up with your two column headings.

Set the first field's datasource to be
Code:
=IIf([MyFieldName]="BKUB",[MyFieldName],"")

Set the second field's datasource to the other value, i.e.
Code:
=IIf([MyFieldName]="WFC",[MyFieldName],"")

Code:
MyFieldName
corresponds to the name of the field in which your data (BKUB or WFC) is being entered.

End result is only one of the fields will display - if your field is BKUB then the left-hand side will display, if it's WFC then the right-hand side will display.

Is this what you're after?

Regards

Mac
 
sorta
It displays one on left then the one on the right is displayed, but really low

asdasas
dasdasda
sdasdasd
asdasdas
asdasddasd
asdasddasd
asdasddasd
asdasddasd
 
You could use two subreports inserted side-by-side into your main report, one for BKUB and one for WFC.

Hoc nomen meum verum non est.
 
Hi guitardave78

I think I may have missed the point a little - I was assuming it was only the BKUB/WFC value itself that you wanted to display on either side of the report.

Indeed, CosmoKramer has the rights of it. To print entire records on a particular side of the report, build two subreports and place them side by side. On the left, the query for the subreport should have a parameter that your field = BKUB, whilst the one on the right should have a parameter = WFC. This will display two lists of records, side by side, with no intervening horizontal gaps.

Sorry, sometimes my desire to help overtakes my ability to read.

(Star for you, CosmoKramer - for your solution as well as your reading skills!)

Regards

Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top