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

Help with two dimensional data

3 Answers 98 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wadigzon
Top achievements
Rank 1
Wadigzon asked on 16 May 2013, 09:12 PM
Hi there, this is the structure of my data
{int id, int ring, string phase} where id=1, 2, ..., 16, ring=1,2,3,4, phase = short string 

The report I want is shown on desired_report.gif

What you see in the boxes are
|=============================
| Sequence - {id}                               | <==== title of the box 
=============================
| Ring {ring}        |   {phase}               | <==== this section grows vertically (per id/sequence)
=============================

I tried doing something similar without much success all I've got is this report shown in havethis_report.gif
the layout of the report (design mode) is shown in layout_report.gif

the structure of the report is shown in explorer_report.gif

for the list lstDetailData I have the following :
row group expression: "(Field.Ids+Fields.Ring-2)%32"
column group expression: "(Field.Ids+Fields.Ring-2)/32"

What occurred to me is to hide the title every four elements like this:
            textBox4.Bindings.Add(new Binding("Visible", "= Fields.Ring = 1"));
            txtId.Bindings.Add(new Binding("Visible", "= Fields.Ring = 1"));

but you can still see some spaces left when that element is not visible, shown in almosthere_report.gif
my questions:

1) can this even be done using telerik reporting?
2) how do I make the space of a hidden object on a report also go away.?

regards and thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 21 May 2013, 03:25 PM
Hello Wadigzon,

Please check the attached sample project illustrating how row and column groupings in a Crosstab item, can give you a layout, similar to the desired one. For more details, look at the explanations provided in this forum thread - Multi Column DetailsSection with full with header/footer.

Another approach we can suggest is to use multi-column layout illustrated in the example installed by default under C:\Program Files (x86)\Telerik\Reporting Q1 2013\Examples\CSharp\ReportLibrary\Multicolumn

I hope this helps.

Greetings,
Stef
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Wadigzon
Top achievements
Rank 1
answered on 22 May 2013, 05:51 PM
Hi Stef, 
this certainly can work, the question I have is

Your example has "=Fields.Details" as the Binding item for the table element (table1), property path DataSource.
For my data, I need a subset in each block, I can create a function that returns a List<string> given a certain ID, 
the question I have is how do I relate this function to the binding item, say DataSource = "Fields.GetMeTheSubSet(Fields.Id)"

is that even possible?

this is my Data:

    public partial class AscSequence
    {
        public Int32 DeviceId { get; set; }
        public Int32 Id { get; set; }
public Int32 Ring { get; set; }
        public String Phases { get; set; }
        public AscSequence(Int32 deviceId, Int32 id, Int32 ring, String phases)
        {
            this.DeviceId = deviceId;
            this.Id = id;
            this.Ring = ring;
            this.Phases = phases;
        }
    }

    class AscSequences:List<AscSequence>
    {
        public AscSequences()
        {
            this.Add(new AscSequence(8, 1, 1, "1,6"));
            this.Add(new AscSequence(8, 1, 2, "1,7"));
            this.Add(new AscSequence(8, 1, 3, "1,8"));
            this.Add(new AscSequence(8, 1, 4, "1,9"));

            this.Add(new AscSequence(8, 2, 1, "2,3"));
            this.Add(new AscSequence(8, 2, 2, "2,4"));
            this.Add(new AscSequence(8, 2, 3, "2,5"));
            this.Add(new AscSequence(8, 2, 4, "2,6"));

            this.Add(new AscSequence(8, 3, 1, "3,4"));
            this.Add(new AscSequence(8, 3, 2, "3,5"));
            this.Add(new AscSequence(8, 3, 3, "3,6"));
            this.Add(new AscSequence(8, 3, 4, "3,7"));

            this.Add(new AscSequence(8, 4, 1, "4,5"));
            this.Add(new AscSequence(8, 4, 2, "4,6"));
            this.Add(new AscSequence(8, 4, 3, "4,7"));
            this.Add(new AscSequence(8, 4, 4, "4,8"));

            this.Add(new AscSequence(8, 5, 1, "5,6"));
            this.Add(new AscSequence(8, 5, 2, "5,7"));
            this.Add(new AscSequence(8, 5, 3, "5,8"));
            this.Add(new AscSequence(8, 5, 4, "5,9"));

            this.Add(new AscSequence(8, 6, 1, "6,7"));
            this.Add(new AscSequence(8, 6, 2, "6,8"));
            this.Add(new AscSequence(8, 6, 3, "6,9"));
            this.Add(new AscSequence(8, 6, 4, "6,10"));

            this.Add(new AscSequence(8, 7, 1, "7,8"));
            this.Add(new AscSequence(8, 7, 2, "7,9"));
            this.Add(new AscSequence(8, 7, 3, "7,10"));
            this.Add(new AscSequence(8, 7, 4, "7,11"));

            this.Add(new AscSequence(8, 8, 1, "8,9"));
            this.Add(new AscSequence(8, 8, 2, "8,10"));
            this.Add(new AscSequence(8, 8, 3, "8,11"));
            this.Add(new AscSequence(8, 8, 4, "8,12"));

            this.Add(new AscSequence(8, 9, 1, "9,10"));
            this.Add(new AscSequence(8, 9, 2, "9,11"));
            this.Add(new AscSequence(8, 9, 3, "9,12"));
            this.Add(new AscSequence(8, 9, 4, "9,13"));

            this.Add(new AscSequence(8, 10, 1, "10,11"));
            this.Add(new AscSequence(8, 10, 2, "10,12"));
            this.Add(new AscSequence(8, 10, 3, "10,13"));
            this.Add(new AscSequence(8, 10, 4, "10,14"));

            this.Add(new AscSequence(8, 11, 1, "11,12"));
            this.Add(new AscSequence(8, 11, 2, "11,13"));
            this.Add(new AscSequence(8, 11, 3, "11,14"));
            this.Add(new AscSequence(8, 11, 4, "11,15"));

            this.Add(new AscSequence(8, 12, 1, "12,13"));
            this.Add(new AscSequence(8, 12, 2, "12,14"));
            this.Add(new AscSequence(8, 12, 3, "12,15"));
            this.Add(new AscSequence(8, 12, 4, "12,16"));

            this.Add(new AscSequence(8, 13, 1, "13,14"));
            this.Add(new AscSequence(8, 13, 2, "13,15"));
            this.Add(new AscSequence(8, 13, 3, "13,16"));
            this.Add(new AscSequence(8, 13, 4, "13,15"));

            this.Add(new AscSequence(8, 14, 1, "14,15"));
            this.Add(new AscSequence(8, 14, 2, "14,16"));
            this.Add(new AscSequence(8, 14, 3, "14,15"));
            this.Add(new AscSequence(8, 14, 4, "14,14"));

            this.Add(new AscSequence(8, 15, 1, "15,16"));
            this.Add(new AscSequence(8, 15, 2, "15,15"));
            this.Add(new AscSequence(8, 15, 3, "15,14"));
            this.Add(new AscSequence(8, 15, 4, "15,13"));

            this.Add(new AscSequence(8, 16, 1, "16,16"));
            this.Add(new AscSequence(8, 16, 2, "16,15"));
            this.Add(new AscSequence(8, 16, 3, "16,14"));
            this.Add(new AscSequence(8, 16, 4, "16,13"));
        }
    }

As you can see my data is flattened out, no list inside a list.
0
Wadigzon
Top achievements
Rank 1
answered on 22 May 2013, 09:58 PM
I think I got it figured out, 

this will allow me to set a new data source for the list:
listDetailData.Bindings.Add(new Binding("DataSource", "=ReportItem.Report.DataSource.GetEntities(Fields.Id)")); 

        public List<...> GetEntities(object arg)
        {
            var entities = Entities.Where(o => o.Id.Equals(Convert.ToInt32(arg))).ToList();
            return entities;
        }

thanks!
Tags
General Discussions
Asked by
Wadigzon
Top achievements
Rank 1
Answers by
Stef
Telerik team
Wadigzon
Top achievements
Rank 1
Share this question
or