Print Page | Close Window

percentage of completion

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=3954
Printed Date: 27 April 2024 at 11:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: percentage of completion
Posted By: flauzer
Subject: percentage of completion
Date 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

 




Replies:
Posted By: sserge
Date 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


Posted By: flauzer
Date 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


 



Posted By: sserge
Date 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


Posted By: flauzer
Date Posted: 10 April 2006 at 11:40am

Thanks....

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

 



Posted By: pcmaker
Date 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.


Posted By: flauzer
Date 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
 


Posted By: pcmaker
Date 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.



Posted By: flauzer
Date 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 - http://www.bitwisemag.com/copy/vb/vb_graphics1.html
 
 
 


Posted By: pcmaker
Date 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.


Posted By: flauzer
Date Posted: 14 September 2006 at 3:10am
you're welcome!!!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net