Telerik Forums
Reporting Forum
1 answer
100 views
I am becoming VERY frustrated with this reporting tool and the way it deals with grouping. The documentation is no help at all. It throws lots of concepts at you without really explaining what they mean.

What I want to do should really be very basic. This is a simple assembly output, with a master part, and then it's component parts. This should be the simplest type of group to produce yet I've been struggling with days on this and I am way past my deadline. PLEASE HELP.

Here is what I want:

PART NUMBER                                  QTY
ASSEMBLY_PART_NUMBER              1
COMPONENT_PART_1                      2
COMPONENT_PART_2                      3
ASSEMBLY_PART_NUMBER_2          2
COMPONENT_PART_1                      4
COMPONENT_PART_2                      6

Based on what I'm reading, I should be able to accomplish this easily with a table.

How I would expect it to work is:
The heading row is outside the group. The assembly part rows are the grouped row by the assembly part number, then the component part rows are a child detail group under the assembly part group.

This is not at all the behavior I am seeing. When I try to add parent and child groups it doesn't add a new row as I expect, it adds a new column, which just doesn't make any sense to me at all.

Please help me get on the right track with this!
IvanDT
Telerik team
 answered on 13 Nov 2011
0 answers
114 views
I guess I'm just lost as to how I can do this if it is even possible. I have my poco that I would like to bind to the datasource of the table. But I can't figure out how to create the table/crosstable layout to look like the attached image. The problem I'm facing is that I may have n approaches with each approach having n lengths. All approaches have the same number of lengths. Example, I have five approaches with 4 lengths each. From there I have a count for each hour for each approach/length.

Any help on how I can dynamically create the table?

Robert

Here is my model:

public class CrosstabClassificationModel
    {
        public class ApproachModel
        {
            public ApproachModel(List<int> lengthGroups)
            {
                Lengths = new List<LengthModel>();
                int prev = 0;
                foreach(int i in lengthGroups)
                {
                    Lengths.Add(new LengthModel()
                    {
                        Min = prev,
                        Max = i
                    });
 
                    prev = i + 1;
                }
            }
 
            public string Name
            {
                get;
                set;
            }
 
            public ApproachTypes ApproachType
            {
                get;
                set;
            }
 
            public List<LengthModel> Lengths
            {
                get;
                private set;
            }
 
            public void Add(int length, DateTime time)
            {
                foreach(var l in Lengths)
                {
                    if(length.IsBetween(l.Min, l.Max))
                    {
                        l.Add(time);
                        break;
                    }
                }
            }
 
            public override string ToString()
            {
                return Name;
            }
        }
 
        public class LengthModel
        {
            public LengthModel()
            {
                Events = new List<EventModel>();
            }
 
            public string Title
            {
                get
                {
                    if(Max == int.MaxValue)
                        return string.Format("{0} and greater", Min);
                    else
                        return string.Format("{0} - {1}'", Min, Max);
                }
            }
 
            internal int Min
            {
                get;
                set;
            }
 
            internal int Max
            {
                get;
                set;
            }
 
            public List<EventModel> Events
            {
                get;
                private set;
            }
 
            internal void Add(DateTime time)
            {
                var @event = Events.FirstOrDefault(x => x.Time == time);
                if(@event == null)
                {
                    @event = new EventModel()
                    {
                        Count = 0,
                        Time = time
                    };
                    Events.Add(@event);
                }
                @event.Count++;
            }
 
            public override string ToString()
            {
                return Title;
            }
        }
 
        public class EventModel
        {
            public DateTime Time
            {
                get;
                set;
            }
 
            public int Count
            {
                get;
                set;
            }
 
            public override string ToString()
            {
                return Time.ToShortTimeString() + " Total: " + Count.ToString();
            }
        }
 
        public CrosstabClassificationModel()
        {
            Approaches = new List<ApproachModel>();
        }
 
        public DateTime Date
        {
            get;
            set;
        }
 
        public List<ApproachModel> Approaches
        {
            get;
            private set;
        }
 
        public ApproachModel this[string Name]
        {
            get
            {
                return Approaches.FirstOrDefault(x => x.Name == Name);
            }
        }
 
        public override string ToString()
        {
            return Date.ToShortDateString();
        }
    }
Andrew
Top achievements
Rank 2
 asked on 11 Nov 2011
1 answer
111 views
Is it possible to restrict the user input from selecting the date beyond the current date on a date-type report parameter? How should this be done?
Steve
Telerik team
 answered on 11 Nov 2011
6 answers
264 views
Hello,
I went through many 'Enable SSL for Telerik Reporting WCF service' posts and articles. Still, when accessed through ReportViewer - ReportService.svc returns 404. If I use the same url in IE – it works.
I’m using 'reportViewer.ReportServiceClientFactory = this' and as soon as I create binding using: new BasicHttpBinding(BasicHttpSecurityMode.Transport) – I get this error.
Not sure where to look anymore… All other wcf services (same web app) do work with https.

Thanks,Sergey
Sergey
Top achievements
Rank 1
 answered on 11 Nov 2011
1 answer
465 views
I have created a Report in the Designer which contains a Table with a fixed number of columns.  When I added the columns, it set the column heading to the default "string= same as the database field name".  In the application, we create a DataTable object(called DetailsTable) populating the column headings from a resource file and the table rows with the data.  The Report DataSource is set through the NeedDataSource event shown.

What I would like to know is what expression can I use to bring in the column headings from the DataTable object?
The objective is to remove all "hardcoded" strings from our reports.

private void table1_NeedDataSource_1(object sender, EventArgs e)
{
    var objectDataSource = new ObjectDataSource();
    objectDataSource.DataSource = ((BestFitStepDetailsReportView)this.DataSource).StepDetailsTable;
    (sender as Processing.Table).DataSource = objectDataSource;
}


Elian
Telerik team
 answered on 11 Nov 2011
1 answer
115 views
I created a report using an EntityDataSource.  Whenever I make a change to the model and rebuild the solution, my report previews no longer work.  To get them to work, I have to close Visual Studio and reopen the project.  Before restarting Visual Studio, here's the error message I get in the report preview:

The number of members in the conceptual type 'DataModelNS.ChangedEnityType'
does not match with the number of members on the object side type
'DataModelNS.ChangedEntityType'. Make sure the number of members are the
same.
Steve
Telerik team
 answered on 11 Nov 2011
1 answer
90 views
The demo Web viewer generates a javascript error in Chrome. Haven't tried IE yet. This error also occurs in my web app when I use the web forms viewer.

It doesn't seem to cause a problem showing the report, but it is still an error in the console none the less. The attached is a screen shot of the Chrome debugging console. This is the first pass through this function. There's a second pass through that succeeds with an actual valid URL to the .axd handler to, presumably, render the report in the iframe. However, why on the first pass are you trying to load the iframe from javascript:void(0);&RenderID= ?

Just to clarify, this is the demo c# solution, setting the WebDemo as the startup project.
Steve
Telerik team
 answered on 11 Nov 2011
1 answer
210 views
I can set an image URI if I use a picture box.

But the only option I seem to have when binding is to bind the actual image.

So, given that I need to pass the URI of an image to the report (this is for the logo to be used. It is stored as a physical file on the web server. There is no option for saving it in the DB) and that I want to use said image as a background for my Page Header, what do I do?

I know I could just use a picture box, but the image is fairly big and uses a lot of space. I can't overlap the image and the textboxes the data from my Page Header 'cos that's not allowed, so my only real option is to set the image as the background image in the style.

As always, any and all help, etc.

--
Stuart
Elian
Telerik team
 answered on 11 Nov 2011
2 answers
133 views
I was just reviewing Q3'11 Release Webinar Week schedule and couldn't help but notice the complete lack of any mention of Reporting.  I've also noticed that on the products page, the road-map is always empty.

What is Telerik's plans for reporting, what type of resources does it have internally to insure we as customer aren't sinking our time and effort into a dead end?   What is going to be in Q3 why no Q3 beta like the other products?

Marcus Kellermann
Top achievements
Rank 1
 answered on 11 Nov 2011
2 answers
598 views
Hello,

when i'm in a asp.net website i can loop through all the controls with

(foreach Control c in this.Controls)

Is this is also possible in telerik report to loop through all the controls?

kind regards,

Jonam
Steve
Telerik team
 answered on 11 Nov 2011
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?