Progress bar in a cell |
Post Reply |
Author | |
Franco Prudente
Newbie Joined: 01 December 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 28 March 2007 at 8:29am |
Hi, i would add a progress bar in a cell.
How can i do?
Thanks
|
|
fantama
Groupie Joined: 12 October 2006 Status: Offline Points: 15 |
Post Options
Thanks(0)
|
I would like to know too. Please post some code actually doing this instead of saying use DrawItem event etc...... Would be nice if it did not take up entire cell and had a nice border around it.
Thanks
|
|
pcmaker
Groupie Joined: 05 May 2005 Location: Venezuela Status: Offline Points: 23 |
Post Options
Thanks(0)
|
QUE TAL GENTE.
LES PUEDO ESCRIBIR EN ESPAÑOL PARA ENTENDERNOS MEJOR. YO SE LA MANERA PARA HACER LO QUE NECESITAN! |
|
fantama
Groupie Joined: 12 October 2006 Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Gan we get an answer to this please?
|
|
BagLady
Newbie Joined: 28 May 2006 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
Any chance you can post a sample on how to do this, I have been following this thread for a while and am finally adding something as I see no response This is very important to us.
|
|
pcmaker
Groupie Joined: 05 May 2005 Location: Venezuela Status: Offline Points: 23 |
Post Options
Thanks(0)
|
In VB6
1º Put this in column declare: wnd_rpc.SetCustomDraw xtpCustomBeforeDrawRow + xtpCustomDrawItem 2º In wnd_rpc_DrawItem event, this: Private Sub wndAct_DrawItem(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal hdc As stdole.OLE_HANDLE, ByVal left As Long, ByVal top As Long, ByVal right As Long, ByVal bottom As Long, DoDefault As Boolean) If Column.Index = X Then drawProgressCell Item, hdc, left, top, right, bottom, Row.Record.Index End If End Sub Where Column.Index = X is the column where you want use the progress bar. 3º The implement of drawProgressCell sub: Sub drawProgressCell(Item As ReportRecordItem, hdc As stdole.OLE_HANDLE, _ left As Long, top As Long, right As Long, bottom As Long, row_index As Long) Dim rec_porct As Long Select Case Item.Value Case Is < 10 FillBrush = CreateSolidBrush(vbRed) Case Is = 100 FillBrush = CreateSolidBrush(vbGreen) Case Else FillBrush = CreateSolidBrush(Me.BackColor) End Select DeleteObject SelectObject(hdc, FillBrush) rec_porct = (Item.Value * (right - left)) / 100 RectangleX hdc, left, top + 1, left + rec_porct, bottom - 1 End Sub 4º In add_records sub, fill value of the progress cell with this: Record.AddItem Format(va_porct, "###,##0.00") Record.Item(5).Format = "%s%%" Record.Item(5).ToolTip = va_porct & "%" Record.Item(5).ForeColor = vbBlack This format the number, in order to keep the original value(double) in the value of cell. I take a vacation until april 9. I hope that this reply help you in your problems. Bye, Juan Quintero - Venezuela. PD: my englhis is bad, excuseme. |
|
Franco Prudente
Newbie Joined: 01 December 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Thanks, i will try to implement this in C# code...
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |