Telerik Forums
Reporting Forum
7 answers
159 views
Hi.. How can make the GroupFooter be the Page Footer... so It always prints on the bottom of each page.
I'm trying to create a report that prints checks.   The top portion of the report is the invoices being paid.  They are aligned to the top.
The bottom of the report is the actual check. Aligned to the bottom of the page.
The data is grouped by Vendor...  but I can't align the groupfooter to the bottom so it prints 'on the check'
Any ideas how I can get this to work.   Thanks.    

The data looks like this.

INVOICE DATE     VENDOR                    INVOICE  NUMBER               AMOUNT
10/1/2010             ABC                                       100                                      $100.00
10/2/2010             ABC                                       101                                     $200.00

GROUPED BY VENDOR

CHECK AMOUNT   $300


The Check Form Looks like this....
____________________________________________________________________
Date      check #    Invoice                                                            Amount















____________________________________________________________________________
Total         
_____________________________________________________________________________

                                                                                                                Check # 101
 Check Date                           
       to the order of                                                                                                  ________




______________________________________________________________________________












Bob Mills
Top achievements
Rank 2
 answered on 15 Nov 2011
2 answers
165 views
When I try to bind an HtmlTextBox server side no data is displayed on the report, I don't know when this stopped working because a client of mine just reported it happening after my last update to his system using the latest telerik Reporting build. This was working fine before that.

Here's the code, I can't find anything wrong with it.

private void GetAppointments()  
{  
 
    StartDate = new DateTime(2008, 10, 1);  
    EndDate = new DateTime(2008, 11, 1);  
    MemberId = 10;  
    Priority = null;  
    Color = null;  
    EmployeeId = null;  
 
    appointments = (from a in _context.Appointment  
                    where a.Start >= StartDate &&  
                        a.End < EndDate &&  
                        a.WorkOrderId > 0 &&  
                        (a.MemberId.Equals(MemberId) || MemberId == null) &&  
                        (a.WorkOrder.Job.Priority.Equals(Priority) || Priority == null) &&  
                        (a.Color.Equals(Color) || Color == null) &&  
                        (a.WorkOrder.WorkOrderResourceList.Select(r => (long?)r.EmployeeId).ToList().Contains(EmployeeId) || EmployeeId == null)  
                    orderby a.Start  
                    select a).ToList();  
 
}  
 
void Schedule_NeedDataSource(object sender, EventArgs e)  
{  
 
    GetAppointments();  
    tblAppointments.DataSource = appointments;  
 
}  
 
void htmlWorkOrdeDetails_ItemDataBound(object sender, EventArgs e)  
{  
    Telerik.Reporting.Processing.HtmlTextBox details = (Telerik.Reporting.Processing.HtmlTextBox)sender;  
 
    var workOrder = details.DataObject["WorkOrder"as Entities.WorkOrder;  
    var color = (AppointmentColor)details.DataObject["ColorAppointmentColor"];  
    var subject = (string)details.DataObject["Subject"];  
 
    var workOrderDetails = new System.Text.StringBuilder();  
    if (workOrder != null)  
    {  
        var job = workOrder.Job;  
        var jobSite = job.Address;  
        var customer = job.Customer;  
 
        var resources = string.Empty;  
 
        switch (workOrder.AssignedToType)  
        {  
            case 0:  
                resources = "Not Assigned";  
                break;  
            case 1:  
                resources = string.Join(", ", workOrder.WorkOrderResourceList.Select(r => (r.Employee.FirstName + " " + r.Employee.LastName)).ToArray());  
                break;  
            case 2:  
                resources = workOrder.AssignedToContractor.Name;  
                break;  
        }  
 
        workOrderDetails.Append("<div style='background-color: white'>");  
        workOrderDetails.AppendFormat("<b>Work Order # {0}</b><br/>", workOrder.Number);  
        workOrderDetails.AppendFormat("<b>Job Site:</b> {0}, {1}, {2}. {3}<br/>", HttpUtility.HtmlEncode(jobSite.AddressMember), HttpUtility.HtmlEncode(jobSite.City.Name), jobSite.State.Abbreviation, jobSite.ZipCode.ZipCodeMember);  
        workOrderDetails.AppendFormat("<b>Customer:</b> {0}<br/>",HttpUtility.HtmlEncode(customer.Name));  
        workOrderDetails.AppendFormat("<b>Job Name:</b> {0}<br/>", HttpUtility.HtmlEncode(job.Name));  
        workOrderDetails.AppendFormat("<b>Assigned To:</b> {0}<br/>", HttpUtility.HtmlEncode(resources));  
        workOrderDetails.AppendFormat("<b>Notes:</b> {0}"string.IsNullOrEmpty(subject) ? "N/A" : HttpUtility.HtmlEncode(subject));  
        workOrderDetails.Append("</div>");  
    }  
 
    details.Style.BorderWidth.Default = new Unit(1);  
    details.Style.BorderColor.Default = ColorTranslator.FromHtml(color.Name);  
    details.Style.BackgroundColor = ColorTranslator.FromHtml(color.Name);  
    details.Value = workOrderDetails.ToString();  
}  
 
Andrea
Top achievements
Rank 2
Iron
 answered on 15 Nov 2011
2 answers
120 views
when I use telerik reporting trial version to generate report which contains chinese, all texts are wrong displayed.
It seems the encoding isn't correct , but i can't figure out how to set the encoding.
I need your help , thanks!
CHEN
Top achievements
Rank 1
 answered on 15 Nov 2011
6 answers
205 views
When I set the theme to metro everything just goes black on the report viewer. Is there any plans to support this theme?

Robert
Andrew
Top achievements
Rank 2
 answered on 14 Nov 2011
3 answers
198 views
We have MICR Fonts(Fonts for checks) , after installing  these fonts we get to see/apply them in fields of Telerik report. Testing reports on running projects also show the fields in MICR fonts, Our live site do not show the report with these fonts whereas  we installed font on server  also, need your assistance in confirming if the additional fonts working with Telerik reports on live server require some other step


Thanks in advance,

Babita Banerjee
Elian
Telerik team
 answered on 14 Nov 2011
3 answers
246 views
Hello!
I just update my reporting here, and It won't return the DataContext...
that was my code:
private ReportViewerModel Model
{
    get { return DataContext as ReportViewerModel; }
}
I tried to use this code snippet, but still don't work, 'coz I calling the DataContext in a partial class who complements the ReportViewer class
var layoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(this.ReportViewer1, 0);
var rvm = (ReportViewerModel)(layoutRoot.DataContext);

I need to call the DataContext to print my report.. I can see it, in reportviewer, but can't print...
There's something I can do?
Peter
Telerik team
 answered on 14 Nov 2011
4 answers
310 views
With the GRID asp.net component you can set up a nested grid so that each row in the master table has a nested detail table under it. I would like to reproduce this functionality in a report that is only intended for PDF output so no collapsing is necessary. This is for a assembly ticket that shows part kits to be assembled and their component parts. So it looks something like this

MASTER: Bin - Part Number - Description - Qty Ordered - Qty Backordered - UOM
MASTER: Bin - Part Number - Description - Qty Ordered - Qty Backordered - UOM
  Detail:    Bin - Component Part - Quantity - UOM
  Detail:    Bin - Component Part - Quantity - UOM
  Detail:    Bin - Component Part - Quantity - UOM
MASTER: Bin - Part Number - Description - Qty Ordered - Qty Backordered - UOM
  Detail:    Bin - Component Part - Quantity - UOM

Note that sometimes a part may not have any components, so nothing would need to be shown under those.

Ideally the master table and the detail tables would have separate datasources just like the GRID implementation.

Wish so may options (crosstabs, subreports etc... ) it's hard to get started down the right path. Can someone point me in the direction of a tutorial or sample of a solution of a solution for this?
Peter
Telerik team
 answered on 14 Nov 2011
0 answers
98 views
Please give me a tips or help to  create a cross-tab report in telerik using c# in aspx.cs page
thaya
Top achievements
Rank 1
 asked on 14 Nov 2011
1 answer
142 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
149 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
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?