Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - percentage of completion
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

percentage of completion

 Post Reply Post Reply
Author
Message
flauzer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 December 2003
Location: Italy
Status: Offline
Points: 108
Post Options Post Options   Thanks (0) Thanks(0)   Quote flauzer Quote  Post ReplyReply Direct Link To This Post Topic: percentage of completion
    Posted: 07 April 2006 at 3:15am

How to represent in a particular column a percentage (in graphics)?

It's possible to "draw" a simple progress bar with ownerdraw technique?....

Anyone else having this problem or have a different workaround?

Thanks

 

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2006 at 2:24pm
Hi,

You can override OnDrawCaption() method for your custom descendant of CXTPReportRecordItem and draw your progress bar or anything there...

--
WBR,
Serge
Back to Top
flauzer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 December 2003
Location: Italy
Status: Offline
Points: 108
Post Options Post Options   Thanks (0) Thanks(0)   Quote flauzer Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2006 at 2:25am

But in ActiveX version ?  I need something like

Private Sub MethodOwnerDraw_Draw( parameters....)

and hDC of the "cell" so I'll use GradientFill, DrawText, SolidBrush and so on.......

Thanks Serge


 

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2006 at 11:15am

However, the answer is that for VB you can catch a DrawItem event, which has a number of required parameters including hDC.

--
WBR,
Serge
Back to Top
flauzer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 December 2003
Location: Italy
Status: Offline
Points: 108
Post Options Post Options   Thanks (0) Thanks(0)   Quote flauzer Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2006 at 11:40am

Thanks....

Sorry about "wrong" forum, my IE reports correct forum.....M$ damn

 

Back to Top
pcmaker View Drop Down
Groupie
Groupie
Avatar

Joined: 05 May 2005
Location: Venezuela
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote pcmaker Quote  Post ReplyReply Direct Link To This Post Posted: 11 September 2006 at 1:30pm
I DONT UNDERSTAND THIS. PLEASE YOU CAN POST A CODE EXAMPLE.
I TRY TO DO IT IN VB6 FORM WITH 'Xtreme SuitePro ActiveX v9.80' VERSION.
THANKS YOU FOR YOUR HELP.
Back to Top
flauzer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 December 2003
Location: Italy
Status: Offline
Points: 108
Post Options Post Options   Thanks (0) Thanks(0)   Quote flauzer Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2006 at 2:45am
with  pseudo Code....
 
This on Form_load
1) wndReportControl.SetCustomDraw xtpCustomBeforeDrawRow + xtpCustomDrawItem
 
 
2) This on Event....
 
Private Sub wndReportControl_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.Caption = "<YourGraphColumn>" Then
          drawProgressCell item, hdc, Left, TOp, Right, Bottom
      End If
End Sub
 
And then you must implement drawProgressCell sub.....
 
Flavio
 
Back to Top
pcmaker View Drop Down
Groupie
Groupie
Avatar

Joined: 05 May 2005
Location: Venezuela
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote pcmaker Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2006 at 2:07pm

Thanks Flavio, but i canīt do it. I donīt know how implement drawProgressCell sub.

I am looking for an answer in the web, but nothing.

You posted 'More on OwnerDraw' in 06 May 2006 where you upload a zip file with your code, i try downloaded, but is not possible.

Iīm appreciate that you helpme more, in order to you was solved the problem.

Please, excuse me for my bad english.

Thanks.

Juan / Caracas-Venezuela.

Back to Top
flauzer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 December 2003
Location: Italy
Status: Offline
Points: 108
Post Options Post Options   Thanks (0) Thanks(0)   Quote flauzer Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2006 at 3:45am
drawProgressCell is only a name of a sub (or function)....
you can use other name,.....what you want. 
Draw<something>... represents how to draw something on a hdc context.  In the specific case, the hdc is related to the report control (cell)
 
Inside this sub(or function) you can write what you want,
for example draw a line, draw a rect and so on......
 
I suggest you to carefully examine every parameter in
wndReportControl_DrawItem...there you can found useful data
used for drawing on a hdc (for example left, top,....)
 
If this is not clear, I recommend you to read some info on this subject (internet is overflowing...),  you can go here (for instance)... 
http://www.bitwisemag.com/copy/vb/vb_graphics1.html
 
 
 
Back to Top
pcmaker View Drop Down
Groupie
Groupie
Avatar

Joined: 05 May 2005
Location: Venezuela
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote pcmaker Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2006 at 9:42am
THANKS FLAVIO, I DO IT. THE LINK TO 'vb_graphics!', WAS THE KEY.
IN 10 LINES OF CODE, INCLUDING DECLARATIONS.

AND THANKS TOO DONT GIVE ME THE ANSWER AT FIRST, BECAUSE, IT FORCE ME TO FIND MY OWN ANSWER.
AND THEN IS THE TRUE HELP.

IF YOU NEED ANYTHING, WRITE ME.
Back to Top
flauzer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 December 2003
Location: Italy
Status: Offline
Points: 108
Post Options Post Options   Thanks (0) Thanks(0)   Quote flauzer Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2006 at 3:10am
you're welcome!!!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.