This is a migrated thread and some comments may be shown as answers.

Tabular format with vertical line?

5 Answers 266 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
phelix
Top achievements
Rank 1
phelix asked on 24 Sep 2008, 05:01 PM
Hi, I am try to draw a table-like format report using Dock. But can not get it work.

What I want for my report is like the following:

----------------------------------
| col1     | col2      |  col3  |   col4  |
----------------------------------
|             |             |          |            |
|             |             |          |            |
|             |             |          |            |
|             |             |          |            |
|             |             |          |            |
|             |             |          |            |
-----------------------------------

basically, no horizontal lines for data items, only vertical lines to seperate every column.

I tried to set dock to left for every col header (which is in my group header section), but the col1 kept moving to the most right position. other col also moved, the column sequency is change as I set dock property to left for each of them.           

Another problem is there is always a blank between the vertical lines  in the detail section.

Am I doing this right. or we have another better to achieve what I am trying to do.

Thanks in advance


 

5 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 26 Sep 2008, 01:02 PM
Hi phelix,

Items are docked according to their order in the Items collection of their parent. So for example if you have 3 text-boxes docked to the left and you have the following in your code-behind:

            this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.textBox2,
            this.textBox1,
            this.textBox3});

the three text-boxes will appear from left-to-right as follows: textBox2, textBox1, textBox3. In other words the docking order depends on this and not on the order in which you turned on the Dock property. You can easily play around with this statement in the code behind and order them as you desire.

As for the vertical lines I am not quite sure how do you create them. Do you use the Line Shape or you turn on a vertical border of a docked item? Can you please elaborate on that. Do you actually have a data-bound TextBoxes in your DetailSection that stand between the lines? We will need your input on that one in order to identify the situation. If after those suggestions you are still unable to get your report working it might be best to send it to us so that we can take a look at it.

Greetings,
Ross
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
phelix
Top achievements
Rank 1
answered on 26 Sep 2008, 02:01 PM
Hi, Ross:
Thanks for the reply.

I added my textbox on the design view. (not from the code behind. ). Is there a way to check the sequence of them.


I tried both (vertical line shape and data-bound textbox dock property) for the vertical line, it is a very tedious work to draw all the lines and there is still gaps between rows. Using the dock property I still have the above same problem.

Thanks

0
Accepted
Rossen Hristov
Telerik team
answered on 26 Sep 2008, 03:25 PM
Hi phelix,

You can either open the code-behind and edit the order of your items by hand or use the SendToBack and BringToFront commands since they use the ordering in the items collection to determine the z-order. So when you hit SendToBack and BringToFront of a selected item this will move it to both ends of docked items.

The gaps between rows sound very weird. There is absolutely no space between two adjacent Detail Sections so there should be no space between rows.

Anyway, I have attached a sample report that should get you started on your task. Please examine it carefully and modify it as needed to achieve your goals. If you still have any questions do not hesitate to drop us a line.



Best wishes,
Ross
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
phelix
Top achievements
Rank 1
answered on 02 Oct 2008, 08:29 PM
thanks. It works by change the sequence that the textboxes been added.
0
Rossen Hristov
Telerik team
answered on 03 Oct 2008, 08:41 AM
Hello phelix,

Yes, their index in their Parent's Items collection determines the order in which they are docked.

All the best,
Ross
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
phelix
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
phelix
Top achievements
Rank 1
Share this question
or