Print Page | Close Window

[SOLVED] Report crash - xtpColumnResource

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=17890
Printed Date: 15 November 2024 at 6:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Report crash - xtpColumnResource
Posted By: vipper
Subject: [SOLVED] Report crash - xtpColumnResource
Date 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



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


Posted By: vipper
Date Posted: 16 February 2011 at 5:18am
Hi,
 
I just do this sample, so it crashes : (VB6 SP6 - Win 7 32)
 
http://forum.codejock.com/uploads/5580/Projet1.zip - uploads/5580/Projet1.zip
 
---------------------------------------------------------------------
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", " mailto:postmaster@mail.codejock.com - 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


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


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


Posted By: vipper
Date Posted: 16 February 2011 at 4:38pm
Thanks everybody



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