Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [SOLVED] Report crash - xtpColumnResource
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Report crash - xtpColumnResource

 Post Reply Post Reply
Author
Message
vipper View Drop Down
Newbie
Newbie
Avatar

Joined: 05 October 2009
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote vipper Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] Report crash - xtpColumnResource
    Posted: 15 February 2011 at 5:53pm

Hello,

In your sample "ReportSample" , the application crashes when I add this code : wndReportControl.PaintManager.ColumnStyle = xtpColumnResource, in the form "frmProperties".

Is this a bug? Is there a solution ?
it seem to be affected by : Column.TreeColumn = True

Thanks
WinXP SP3 - VB6 SP6
ActiveX COM 15.0.2
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2011 at 2:25am
Hi,

Thanks, 

Can't reproduce it. Maybe you somehow else modify project ? Please attach current code of sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vipper View Drop Down
Newbie
Newbie
Avatar

Joined: 05 October 2009
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote vipper Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2011 at 5:18am
Hi,
 
I just do this sample, so it crashes : (VB6 SP6 - Win 7 32)
 
 
---------------------------------------------------------------------
Option Explicit
Function AddReportRecord(Parent As ReportRecord, _
                         Read As Boolean, _
                         Subject As String, _
                         From As String, _
                         Sent As Date, _
                         Size As Long, _
                         Price As Single) As ReportRecord
    Dim Record As ReportRecord
    If Parent Is Nothing Then
        Set Record = wndReportControl.Records.Add()
    Else
        Set Record = Parent.Childs.Add()
    End If
    Dim Item As ReportRecordItem
    Set Item = Record.AddItem("")
    Item.Icon = IIf(Read, 3, 2)
    Set Item = Record.AddItem("")
    Item.HasCheckbox = True
    Item.Checked = False
    Record.AddItem Subject
    Record.AddItem From
    Record.AddItem Sent
    Record.AddItem Size
    Set Item = Record.AddItem(Price)
    Item.Format = "$ %s"
    Set AddReportRecord = Record
End Function
 
Private Sub LoadReport()
    Dim Record As ReportRecord
    ' Setup ReportControl records
    AddReportRecord Nothing, True, "Undeliverable Mail", "postmaster@mail.codejock.com", "21/06/2004", 7, 5.23
    AddReportRecord Nothing, False, "RE: Hi Mary", "Peter Parker", "19/06/2004", 17, 3.34
    Set Record = AddReportRecord(Nothing, True, "RE:", "Bruce Wayne", "19/06/2004", 11, 3.32)
    AddReportRecord Record, True, "Re: it's me again", "Clark Kent [ckent@codetoolbox.com]", "17/06/2004", 10, 6.34
    AddReportRecord Record, True, "Re: it's me again", "QueryReply", "17/06/2004", 41, 16.42
    Set Record = AddReportRecord(Record, False, "I don't understand:", "Bruce Wayne", "17/06/2004", 1, 5.12)
    AddReportRecord Record, False, "Re:", "Bruce Wayne", "17/06/2004", 23, 8.76
   
    wndReportControl.Populate
End Sub
 
Private Sub CreateColunm()
    Dim Column As ReportColumn
    ' Setup ReportControl columns
    Set Column = wndReportControl.Columns.Add(1, "Icon", 18, False)
    Column.Icon = 0
    Column.Sortable = False
    Set Column = wndReportControl.Columns.Add(2, "Check", 18, False)
    Column.Icon = 1
    Column.Sortable = False
    Set Column = wndReportControl.Columns.Add(3, "Subject", 280, True)
    Column.TreeColumn = True
    wndReportControl.Columns.Add 4, "From", 180, True
    wndReportControl.Columns.Add 5, "Sent", 150, True
    wndReportControl.Columns.Add 6, "Size", 50, True
    wndReportControl.Columns.Add 7, "Price", 80, True
End Sub
 
Private Sub Form_Load()
    ReportControlGlobalSettings.ResourceImages.LoadFromFile App.Path & "\Office2010.dll", "Office2010Blue.ini"
    CreateColunm
    LoadReport
    wndReportControl.PaintManager.ColumnStyle = xtpColumnResource
End Sub
 
What's wrong ?
 
Thanks
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: 16 February 2011 at 1:23pm

Hi Oleg,

Curious as I am, I tried same thing and it crashed. Just change wndReportControl.PaintManager.ColumnStyle = xtpColumnFlat into wndReportControl.PaintManager.ColumnStyle = xtpColumnResource

If you comment Column.TreeColumn = True it doesn't crash anymore
 
[...]
' Set 3 column. First one has a "tree" style
    Set Column = wndReportControl.Columns.Add(0, "Name", 200, True)
    'Column.TreeColumn = True
    Column.Editable = False 
[...]
 
Glad to help Wink
 
 
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
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2011 at 2:02pm
Right... seems its one I already fixed for 15.0.2  Please wait a little will b published soon.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vipper View Drop Down
Newbie
Newbie
Avatar

Joined: 05 October 2009
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote vipper Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2011 at 4:38pm
Thanks everybody
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.203 seconds.