Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - (SOLVED) : some smaill questions about RC
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

(SOLVED) : some smaill questions about RC

 Post Reply Post Reply
Author
Message
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Topic: (SOLVED) : some smaill questions about RC
    Posted: 17 August 2008 at 9:25pm
hi
i have some simple questions

1- how to set color for any cell in RC ? (like microsoft excell)

2- is it possible to change the text in group box top of RC ?
means changing "Drag the column header here to group by that column" to "any other text"

4- how to limit group box to get only 1 column ? user can group records only by 1 column in time .

5- how can making horizontal scroolbar for when we have more columns in RC ?

6- is there any way to putting hyper link in RC`s cell ?

thanks

Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 3:07am
Hi,
 
  1. Set xtremeRecord = wndReportControlFiles.Records.Add()
                    Set xtremeRecordItem = xtremeRecord.AddItem("Some text")
                        xtremeRecordItem.BackColor = vbRed
  2. Use wndReportControl.PaintManager.NoGroupByText  = "Some string" (.NoItemsText is also available)
  3. -
  4. wndReportControl.ShowItemsInGroups = true
  5. wndReportControl.AutoColumnSizing = false
  6. Set xtremeRecord = wndReportControl.Records.Add()
          Set xtremeRecordItem = xtremeRecord.AddItem("Some text")
                xtremeRecordItem.Hyperlinks.AddHyperlink "Some hyperlink string", 10

      

Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 4:06am
Hi .
again thanks

5- when i using this property , insert one empty and no-name column after other columns . for what ?

Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 4:15am
Hi,
 
5. Just add one column and set AutoColumnSizing = False, resize column and you have horizontal scrollbars.
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 4:24am
Originally posted by Aaron Aaron wrote:

Hi,
 
5. Just add one column and set AutoColumnSizing = False, resize column and you have horizontal scrollbars.


sorry . i cant understand your solution

see my code :

Private Sub rpt_q_column_init()
Dim Column As ReportColumn
rpt_q.AutoColumnSizing = False

    Set Column = rpt_q.Columns.Add(0, "#", 30, False)
    Set Column = rpt_q.Columns.Add(1, "a", 100, True)
    Set Column = rpt_q.Columns.Add(2, "aaaaaaa", 180, True)
    Set Column = rpt_q.Columns.Add(3, "aaaa", 180, True)
    Set Column = rpt_q.Columns.Add(4, "aaaa", 130, True)
    Set Column = rpt_q.Columns.Add(5, "aaa", 500, True)
    Set Column = rpt_q.Columns.Add(6, "aa", 100, True)
    Set Column = rpt_q.Columns.Add(7, "aa", 80, True)
    Set Column = rpt_q.Columns.Add(8, "a", 80, True)
    Set Column = rpt_q.Columns.Add(9, "aaa", 80, True)
    Set Column = rpt_q.Columns.Add(10, "aa", 100, True)
    Set Column = rpt_q.Columns.Add(10, "Final", 100, True)
End Sub

by using this code , in RC inserted noname and no-index column after Final column.

*- ( i use unicode for caption column . for this reason i changed column caption immediately , sorry )
Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 6:01am
Hi,
 
No I ment: If you add just one column to RC and the width of the column is larger than RC width you will see scrollbars. AutoColumnSizing = false prevents the RC from sizing columns to total width of RC. So width will be like you added them: Set Column = rpt_q.Columns.Add(0, "#", 30, False) and if sum of all column width's exceed RC width you will have a horizontal scrollbar.
 
Or I don't understand what you mean...
 
Please add SOLVED in your topic description the way all members do. SOLVED:     and not (solved) as you do now and also your past posts, OK?  It's better to do it the same way.

 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 6:56am
Originally posted by Aaron Aaron wrote:

Hi,
 
No I ment: If you add just one column to RC and the width of the column is larger than RC width you will see scrollbars. AutoColumnSizing = false prevents the RC from sizing columns to total width of RC. So width will be like you added them: Set Column = rpt_q.Columns.Add(0, "#", 30, False) and if sum of all column width's exceed RC width you will have a horizontal scrollbar.
 
Or I don't understand what you mean...

Hi
no , no . its not my problem . i set scrollbar propery true and scroolbar in suitable time showed in RC . but i asked from you why i have in RC one empty column after other column that i insert ?

please in form call rpt_q_column_init()
can you see one no-name  column after "final" column ?


Originally posted by Aaron Aaron wrote:


Please add SOLVED in your topic description the way all members do. SOLVED:     and not (solved) as you do now and also your past posts, OK?  It's better to do it the same way.


I prefer any sub-forum has one sticky topic like this for small and frequently question . it leads to users dont force to start  new topic for small subject and small questions . anyway perhaps these topics ocure as simple refrence for beginners .


 

Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 7:13am
Hi,
 
The only thing I see in your code is that you have 2 columns with same index.
 
You don't need to add an extra column. My answer was an example how you would see horizontal scrollbars. Just add columns and set AutoColumnSizing = False. That's it
 
 
You can ask as many question as you want in the subforums. If you have more questions, like you have now, just put them in one post. These are general RC questions and you don't need to post them seperatly
 
But it would be nice if you would change your descriptions of ALL your post like we all do (well not all, there will always be hard headed members who think they know better and just do what they think is best )
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 7:44am
Originally posted by Aaron Aaron wrote:

Hi,
 The only thing I see in your code is that you have 2 columns with same index.

hi
not matter . when i insert "Final" column after copy/paste from visual basic in forum add this .

 
Originally posted by Aaron Aaron wrote:

You don't need to add an extra column. My answer was an example how you would see horizontal scrollbars. Just add columns and set AutoColumnSizing = False. That's it
 


i think u didnt understand what i said .
see here :

 
can you see un-expected column now ??


 


Q.Q
for other things OK . i change title when find solution . like always

Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 8:04am
Hi,
 
Please, upload your test project and I will look into it.
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
AndreiM View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 18 August 2007
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndreiM Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 10:00am
Hi,
do you use Right-to-Left mode?
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2008 at 9:27am
Originally posted by Aaron Aaron wrote:

Hi,
 
Please, upload your test project and I will look into it.
 


Hi
ok
uploads/20080819_092459_nenkalo-test.zip

tnx

Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2008 at 9:27am
Originally posted by AndreiM AndreiM wrote:

Hi,
do you use Right-to-Left mode?


Hi
yes .

Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2008 at 11:12am
Add this to your rpt_q_column_init sub:


rpt_q.FullColumnScrolling = False


It seems to get rid of the extra column.

This extra blank column is useful visually when the total columns width doesn't exceed the width of the control (i.e. no scrollbars), but I'm not sure why it's there when there are scrollbars because the scroll could just stop at the last "actual" column.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2008 at 4:22pm
Hi

Thanks sir jpbro
it solved :)

.

New Professional Question :

7- I have one RC control in my prject that i inserted records via some tables and operating and other relations .and now is filled and ready .
now i want to use this Grid like one Table for sql statment .

you imagine my RC named rc_grid and i have 2 MS-access table that called Table1 and Table2 .(there is name filed in all tables.)
i want to use SQL statement like this :

select * from Table1,Table2, rc_grid.table*
where RC_grid.table.name = Table1.name
inner join ...

i must use it for inner join and other operators :)


------------
*- rc_grid.table is not exist now really . i want to have any thing that behavior like it .


Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2008 at 1:38am
Originally posted by nenkalo nenkalo wrote:

Hi

[...]

*- rc_grid.table is not exist now really . i want to have any thing that behavior like it .


 
Hi,
 
You have to be patience, maybe there will be something possible in next version(s) but for now you have to create them with your own SQL statements and add RC records.
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2008 at 1:43am
Originally posted by jpbro jpbro wrote:

Add this to your rpt_q_column_init sub:

It seems to get rid of the extra column.

This extra blank column is useful visually when the total columns width doesn't exceed the width of the control (i.e. no scrollbars), but I'm not sure why it's there when there are scrollbars because the scroll could just stop at the last "actual" column.
 
Hi Jason,
 
If you use FreezeColumnsCount property and scroll to the right you can not just stop at last column... or Andrei would have to implement autosize after FreezeColumnsCount  That would be a nice feature...
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2008 at 11:26am
Hi Aaron
Thanks
Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
AndreiM View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 18 August 2007
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndreiM Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2008 at 1:51pm
Hello nenkalo,
this is not an additional column, this just no-columns header background.
It is on the left because you yse RTL mode.
For left-to-right it is on the right (and looks not so confusable:).
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2008 at 11:34am

HI AndreiM , tnx :)

-----
 
now i want to use icon in RC by using imagemanager . in samples icon in RC loaded from harddisk by loadbitmap and/or any other functions .
i want to set icon in RC by imagemanager .
plz help me :)
Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
AndreiM View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 18 August 2007
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndreiM Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2008 at 3:56pm
Hi,
can you tell more details about what do you need?.
or why code from sample is not good for you?
Back to Top
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2008 at 4:23pm
Hi AndreiM
in any control we can load icons with 2 ways :
1- load icon from harddisk by using loadbitmap and ... . like it :
 wndReportControl.Icons.LoadBitmap App.Path & "\Icons\itemcontrols.bmp", iconArray, xtpImageNormal

2- load icons from image manager . in this method we load icons in design time in imagemanager control . and it resourced in project.

*-*
now i want to set icon in any record in RC . in examples all of items loaded to RC via loadbitmap funcion (first way)
please help me to load icon from imagemanager to RC .
tnx

Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
Back to Top
AndreiM View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 18 August 2007
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndreiM Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2008 at 11:21am
WAY 1:
    wndReportControl.Icons.LoadBitmap App.Path & "\Icons\bmreport.bmp", iconArray, xtpImageNormal
           
WAY 2:
    wndReportControl.Icons.AddBitmap ImageList1.ListImages.Item(1).Picture.Handle, COLUMN_MAIL_ICON, xtpImageNormal, False
    wndReportControl.Icons.AddBitmap ImageList1.ListImages.Item(2).Picture.Handle, COLUMN_IMPORTANCE_ICON, xtpImageNormal, False
    wndReportControl.Icons.AddBitmap ImageList1.ListImages.Item
................
 
WAY 3:
    wndReportControl.Icons.AddIcon ImageList1.ListImages.Item(1).ExtractIcon().Handle, COLUMN_MAIL_ICON, xtpImageNormal
    ' .....
   
WAY 4:
    wndReportControl.Icons.RemoveAll
    wndReportControl.Icons.AddBitmap ImageList2.ListImages.Item(1).Picture.Handle, iconArray, xtpImageNormal, False
the bitmap in ImageList2 will be slitted
 
-----------------------------------------------------------------
I modify or sample project to play with this code:
-----------------------------------------------------------------
 
There are also method ReportControl.SetImageList
but it works fine only if you add icons to image list (not a bitmaps).
 
WAY 5:
wndReportControl.SetImageList ImageList3
 
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.156 seconds.