SELECT w.Firstname, w.Lastname, wf.Login, wf.Logout, DATEDIFF(hour, wf.Login, wf.Logout) AS Hours
FROM Workers AS w INNER JOIN
Workflow AS wf ON wf.LoggedInWorkerid = w.ID
WHERE (wf.Login >= @dtstrtDate) AND (wf.Logout <= @dtendDate)
DECLARE @dtstrtDate AS DateTime
SET @dtstrtDate = '02/13/2012'
DECLARE @dtendDate AS DateTime
SET @dtendDate = '02/17/2012'
SELECT w.Firstname, w.Lastname, SUM(DATEDIFF(hour, wf.Login, wf.Logout)) AS Hours
FROM Workers AS w JOIN Workflow AS wf ON wf.LoggedInWorkerid = w.ID
WHERE wf.Login >= @dtstrtDate AND wf.Logout <= @dtendDate
GROUP BY w.Lastname, w.FirstName
ASHOK ENTERPRISE | ASHOK ENTERPRISE | |||||
DATE : | 12/1/2011 | DATE : | 12/1/2011 | |||
ANAN BUILDERS | ANAN BUILDERS | |||||
PAYMENT IS DUE AS PER UNDERMENTIONED | PAYMENT IS DUE AS PER UNDERMENTIONED | |||||
BILLS, SO PLEASE MAKE THE PAYMENT SOON. | BILLS, SO PLEASE MAKE THE PAYMENT SOON. | |||||
BILL NO. | DATE | AMOUNT Rs. | BILL NO. | DATE | AMOUNT Rs. | |
150 | 6/30/2011 | 5000 | 150 | 6/30/2011 | 5000 | |
175 | 7/31/2011 | 5500 | 175 | 7/31/2011 | 5500 | |
200 | 8/31/2011 | 5500 | 200 | 8/31/2011 | 5500 | |
225 | 9/30/2011 | 5000 | 225 | 9/30/2011 | 5000 | |
250 | 10/31/2011 | 5500 | 250 | 10/31/2011 | 5500 | |
300 | 11/30/2011 | 5000 | 300 | 11/30/2011 | 5000 | |
TOTAL RS. | 31500 | TOTAL RS. | 31500 |
If
HttpContext.Current.Session(
"DynamicReportDatas"
) IsNot
Nothing
Then
Dim
datas
As
DataTable = HttpContext.Current.Session(
"DynamicReportDatas"
)
Me
.Table1.DataSource = datas
Dim
textboxGroup
As
Telerik.Reporting.HtmlTextBox
Dim
textBoxTable
As
Telerik.Reporting.HtmlTextBox
Table1.ColumnGroups.Clear()
Table1.Body.Columns.Clear()
Table1.Body.Rows.Clear()
Dim
ColCount
As
Integer
= datas.Columns.Count
For
i
As
Integer
= 0
To
ColCount - 1
Dim
tableGroupColumn
As
New
Telerik.Reporting.TableGroup()
Table1.ColumnGroups.Add(tableGroupColumn)
'table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Unit.Inch(1)));
textboxGroup =
New
Telerik.Reporting.HtmlTextBox()
'textboxGroup.Style.BorderColor.[Default] = Color.Black
'textboxGroup.Style.BorderStyle.[Default] = BorderType.Solid
textboxGroup.Value = datas.Columns(i).ColumnName
textboxGroup.Size =
New
SizeU(Unit.Inch(1.4), Unit.Inch(0.2))
textboxGroup.Style.BackgroundColor = Color.FromName(
"#79A7E3"
)
textboxGroup.Style.Font.Bold =
True
textboxGroup.Style.Font.Size =
New
Unit(10)
textboxGroup.Style.VerticalAlign = VerticalAlign.Middle
textboxGroup.Style.TextAlign = HorizontalAlign.Left
tableGroupColumn.ReportItem = textboxGroup
textBoxTable =
New
Telerik.Reporting.HtmlTextBox()
'textBoxTable.Style.BorderColor.Default = Color.Black;
'textBoxTable.Style.BorderStyle.Default = BorderType.Solid;
textBoxTable.Value =
"=Fields.["
+ datas.Columns(i).ColumnName &
"]"
textBoxTable.Size =
New
SizeU(Unit.Inch(1.4), Unit.Inch(0.3))
textBoxTable.Style.VerticalAlign = VerticalAlign.Middle
textBoxTable.Style.TextAlign = HorizontalAlign.Left
Table1.Body.SetCellContent(0, i, textBoxTable)
Table1.Items.AddRange(
New
ReportItemBase() {textBoxTable, textboxGroup})
Next
End
If
Hello everyone,
I have to create a report with in total 4 nested tables. We'll do the example with only 2 tables for easier comprehension.
Assume we have an array with Orders, and in this table is an array with Products. So for each Order we have several Products.
I made a TelerikTable which is bound on the Orders. The first line is the table headers. Each Order has 3 lines:
- 1: specific information about the Order (id Order, ...)
- 2: A merged line with another table in it, bound on the Products array.
- 3: The total of all Products of that Order.
For better / clear comprehension, look at the NestedTable.jpg (attached file).
Let’s export that list in PDF format:
Now the problem is that some Orders have a lot of Products: for example 200 Products. An order doesn't necessarily begin at the beginning of the A4 page (it can be in the middle). So the array of Products of the second Order doesn’t fit on the first page, and it makes automatically a page break (because its 1 merged line of the main table?).
For better / clear comprehension, look at the ProblemNestedTable.jpg (attached file).
KeepTogether parameter is everywhere to false.
I don’t want that page break, but fragment the nested table (Products).
Is there a way that there is a “Keep Table Line Together = False”? Or I may be completely wrong with my table structure? Maybe there is another option instead of nested tables?
Thanks a lot :)
Raphael