Crystal Reports Groups and Columns

I'm using Crystal Reports that came with VS 2005

 I have a Dataset of Phone Extenions that I pass to Crystal Reports then exports it to a PDF for printing.
  There are 4 groups in the dataset, Main Numbers, Fax Numbers, Branch 1, Branch 2.    I like to get them to display evenly in 2 columns.  ex.  13 numbers in a group, 1st column has 7 numbers the 2nd column has 6 numbers.
I need them to look like this SS (1st Phonelist image).  This listing is when the Section Expert/ Format with Mulitple Columns, Printing Direction (Across then Down).  As you can see, while groups are even, The order is across.. so instead of
a      d
b      e
c      f
a     c
b     d

we have
a      b
c      d
e      f

a     b
c     d

If I tell it  Printing Direction (Down then Across)  All the groups but the bottom group is in one column.  in 2nd Phonelist image
a     c
b     d

How to I get the groups to display down and across with the columns even for that group?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do you have keeptogether set to false?
EdwardAuthor Commented:
No I have keep together as true.
Please select Format Groups with multiple column so formatting is applied to all and try it.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Keeptogether set to True may be the cause of printing it accroos because it tries to fit the entire group if there is room and in this case there is room to the right. Please try deselecting it and run the report to see.
Could you include the same print screen as above but for your group?
EdwardAuthor Commented:
When I do that, I jsut get one column of Groups with a 2nd column when it hits the end.
EdwardAuthor Commented:
opps forgot the SS.
When you do what?
Doesn't it continue on the next page?
Oh I just saw your post.
Try keeptogether = false quickly and see what you get.
And leave Format Groups with multiple column selected.
EdwardAuthor Commented:
Ok.. Details 3.  keeptogether = false, Format Groups with multiple column  = false

Details 4.  keeptogether = false, Format Groups with multiple column  = True

I believe Detail section Format Groups with multiple column needs to be true.
EdwardAuthor Commented:
Those are in the Detail section.
Oh, I was going by your Ok.. Details 3.  keeptogether = false, Format Groups with multiple column  = false.
Needs to be true.
How many columns did you set it up for?
OK. I believe that is the intended behavior. As long as there is room for another column once it exhausts that columns it jumps to the next one. If there is enough room on the page for another one it will take it.
You need to setup the width of the report accordingly (Page Setup). Make the width so there is not enought room for two columns (one column is actually the two field column) and then it will work.
What I did is in Page Setup I set my right margin to 6 so there wouldn't be room for a second column.
By adjusting the right margin you still leave the papersize the same so you will not encounter issues with printers not recognizing the parpersize.
EdwardAuthor Commented:
If i do that I get 1 column and 2 pages.. I don't want 2 pages. I need everything on 1 page.

As the 1st image (phonelist1) is how I want it to look.    But Alpha order down the column.  

 for my example I'll use a letter for the name and a number for the ext.
A   1        D   4
B   2        E    5
C   3        F    6
A   7        C 9
B   8

I thought you didn't want it  like your very first example. You do want it like your very first screen print?
EdwardAuthor Commented:
Yes.. I need it like the 1st example.  but the 1st example the alpha order is across the row. not up and down.
Put each group in a separate detail section.
EdwardAuthor Commented:
How do I make it more dymanic?  if we add a new section, I really dont want have to add a new detail section.
It works for me. Try adjusting the width. Try 2 and see if behavior changes.
EdwardAuthor Commented:
Right now the width is 3.  

When you say, Put each group in a separate detail section.  Do you mean to hard code the group names to differant sections?

Here is a image of my current layout.
EdwardAuthor Commented:
darn.. forgot the ss agian,
You would need to create a detail section for each group  and have each one show on groupname="thegroupname".
You are talking about having it be dynamic but how will you accomplish it if you only want it on one page?  What about when the list grows over one page?
If you only want one page then move your footer from the page footer section to the report section and suppress page footer.
EdwardAuthor Commented:
Ok.. let me see if I can get it to work.   If the list goes larger then 1 page, then that means we are rolling is money and are growing.   then it will be a 2 page list.
Hold on. First of all. Make a copy of your current report before you start changing anything =)
I am testing to see if by using it as a subreport it would self-contain its size to fit in the detail section.
The subreport can be limited in size but you would only see that much of it in the main report.  The size of the box in the main report doesnt affect the true size of the report.

The problem is you want to go down 4 then across and down 3.
To get the columns to be the same size then you need to go across then down but that then puts them in this order rather than

1      2
3      4
5      6

I think you want
1      5
2      6
3      7

There is no easy way to get that in Crystal.

A reminder: The detail section MUST have Format Groups with multiple column  = true.

You may want to try just using a blank report and add your current report as a subreport to it and see if the size now works out for you.
It that doesn't work you could at least use a subreport to be able to bring in all your groups without hard coding.
EdwardAuthor Commented:
mlmcc, yes that is right..   I need total size of the detail section  half (rounded up) the total rectords for that section.  so if its 5 records then the size is 3.
EdwardAuthor Commented:
I stil think the subreport will still display the data in the groups wrong.  I also don't know how to pass the dataset to the subreport.   I'm currently doing  MainRpt.SetDataSource(ListDS);  pass the dataset to the report.
I don't know how it would behave if you make the subreport small with can grow if it would try to stay small and then grow it may make the groups smaller. Not sure.
Down then accross will keep on going down as long as there is room and then accross. So the first groups will keep on going down. I don't see anything wrong with your report as you had it originally. Is it a requirement that you make it look differently? It just seems like an awful lot of time for a phone directory. You would be better off using Word or Excel.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EdwardAuthor Commented:
The reason is because everone says its hard to find the person because its going back and forth instead of down then up.

I like how its easy to dyamnically send a dataset to the report and have it createa pdf easly without extra software.
Can you artificially add a sorting field to the data so they are sorted the way you want but Crystal thinks they are sorted differently?

For instance for a dept

Abe Doe       1
Bill Doe       3
Cal Jones     5
Dave Smith    2
Frank Town    4
Jim Yates       6

do you know you can import a db query into word or excel and you can print to free adobe printers (which converts the document to an adobe pdf)?
EdwardAuthor Commented:
Thanks, I do know, but this is for the web and automating word/excel is not supported like that from MS and requires word/excel to be installed on the server.   I currently working on using Apose.Cells to create a xlsx and export to pdf.   This is probably what I will be doing.   I'm gonig to keep the question open for a few days to see if anyone else will input.  
EdwardAuthor Commented:
Thanks for the help,  It looks like CR can reorder like I need it too.  Its really too bad.  

using Apose.Cells to create the list the way I need it and export to pdf.
EdwardAuthor Commented:
Bah.. that is Thanks for the help, It looks like CR CAN'T reorder like I need it to.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.