size a listbox dynamically

G

ghetto_banjo

I have a Subreport which contains a listbox that is bound to a table
to get values. The main report is a letter to a customer. I would
like it so the subreport and listbox are only as big enough as they
need to be. The list box ranges from 1 item to 8 items.

Is there a way to dynamically size the listbox and/or subreport on the
report opening? I tried fooling around with something like
myList.Height = myList.Listcount * somenumber but it did not seem to
work.

Let me know if you need more information. I can get the list off of
the subreport if need be and put it on the main report. Maybe a
listbox is the wrong thing to use altogether here?

Thanks.
 
M

Marshall Barton

ghetto_banjo said:
I have a Subreport which contains a listbox that is bound to a table
to get values. The main report is a letter to a customer. I would
like it so the subreport and listbox are only as big enough as they
need to be. The list box ranges from 1 item to 8 items.

Is there a way to dynamically size the listbox and/or subreport on the
report opening? I tried fooling around with something like
myList.Height = myList.Listcount * somenumber but it did not seem to
work.

Let me know if you need more information. I can get the list off of
the subreport if need be and put it on the main report. Maybe a
listbox is the wrong thing to use altogether here?


Create another (sub)report for the data instead of using a
list box. Then you can use CanGrow/CanShrink without all
that messing around.
 
G

ghetto_banjo

I have serious issues with making things more complicated than need
be.


Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top