Print Page | Close Window

[DISCUSSION] Help in RC forum

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


Topic: [DISCUSSION] Help in RC forum
Posted By: Aaron
Subject: [DISCUSSION] Help in RC forum
Date Posted: 21 March 2010 at 7:04am
 
Hi,
 
I'm creating a list with all known bugs in ReportControl V13.3.0 see post https://forum.codejock.com/forum_posts.asp?TID=16309 - https://forum.codejock.com/forum_posts.asp?TID=16309  but I need your help. I'm familiar with a lot of features in RC but some of them I never used so maybe there are members who are using following features and want to help
 
HeaderRecords
FooterRecords
GroupFormula
PreviewItem
Fieldchooser   
 
 
If you are having a problem / bug, it would be nice to include a testproject to help me understand what you mean
 
Thanks a lot in advance
  


-------------
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....



Replies:
Posted By: roMi
Date Posted: 23 March 2010 at 7:20am

Hi!

We've got issue with dynamic formula in ReportControl V13.3.1 unicode.
 
In compiled exe dynamic formula evaluates an integer when it should not (sum result should be decimal) and replaces regional decimal separator "," to ".". Different formating options do not help.
 
We're working in VB6 on Win XP/Vista/7.
 
 
Thank you,
Miro


Posted By: Aaron
Date Posted: 26 March 2010 at 5:55am
Hi,
 
Thanks for reply. Is it possible to upload small sample to demonstrate the issue? Just in case CJ ask for one, and as I said before I don't use above features, so I won't be able to reproduce the issue you mentioned.
 
Note: I will add this to the list anyway.
 
Thanks in advance
 


-------------
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: roMi
Date Posted: 26 March 2010 at 6:19am
Hello!
 
Of course, sample code follows..
Have it all to minimise reproducing effort .
Just to mention again, difference is in behavior between dev environment and compiled exe. In dev it works fine.
 
The form:
 
VERSION 5.00
Object = "{7CAC59E5-B703-4CCF-B326-8B956D962F27}#13.3#0"; "Codejock.ReportControl.v13.3.1.ocx"
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin XtremeReportControl.ReportControl wndReportControl
      Height          =   1935
      Left            =   600
      TabIndex        =   0
      Top             =   720
      Width           =   3615
      _Version        =   851971
      _ExtentX        =   6376
      _ExtentY        =   3413
      _StockProps     =   64
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
 Dim Record As ReportRecord
 Dim Item As ReportRecordItem
 Dim Button As ReportItemButton
 Dim Column As ReportColumn
   
    'Adds a new ReportColumn to the ReportControl's collection of columns, growing the collection by 1.
    Set Column = wndReportControl.Columns.Add(COLUMN_IMPORTANCE, "kolona1", 100, False)
    'Adds new record
    Set Record = wndReportControl.Records.Add()
  
    Set Item = Record.AddItem("2")
    Set Record = wndReportControl.Records.Add()
    Set Item = Record.AddItem("4")
    Set Record = wndReportControl.Records.Add()
    Set Item = Record.AddItem("10,2")
    Set Record = wndReportControl.Records.Add()
    Set Item = Record.AddItem("11,01")
   
    Set Record = wndReportControl.Records.Add()
    Set Item = Record.AddItem("x") '.Bold = True
    Item.Format = "%04.2f"
    Item.Formula = "SUM(R*C0:R*C1)"
   
    wndReportControl.ReCalc True
    wndReportControl.Populate
   
End Sub
 
The project:
 
Type=Exe
Form=Form1.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOWS\system32\stdole2.tlb#OLE Automation
Object={7CAC59E5-B703-4CCF-B326-8B956D962F27}#13.3#0; Codejock.ReportControl.v13.3.1.ocx
Startup="Form1"
Command32=""
Name="Project1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="N-LAB"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
[MS Transaction Server]
AutoRefresh=1
 
Regards,
Miro
 


Posted By: wlcabral
Date Posted: 26 March 2010 at 5:19pm
Hi Aaron,
 
I sent a request to codejock about a problem with formula in a footerRecord,  The sample is written in FoxPro.
  

SUPPORT REQUEST:

Can I use formula in a footerRecord Item .

** Sample in Foxpro : See picture attached .

wndReport = main.oactiveclass.otoPGRID.xTremeReportControl.obJECT

wndReport .ClearContent()
wndReport .Columns.DeleteAll()
wndReport .FooterRecords.DeleteAll()


True = .t.
False = .f.


  
  wndReport.Columns.Add( 0, "Product", 100, True)
  wndReport.Columns.Add( 1, "State", 100, True)
  wndReport.Columns.Add( 2, "Sales", 100, True)
  wndReport.Columns.Add( 3, "", 100, True)
    
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("Pen")
  xRecordItem = xRecord.AddItem("NSW")
  xRecordItem = xRecord.AddItem("20")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("paper")
  xRecordItem = xRecord.AddItem("NSW")
  xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("Books")
  xRecordItem = xRecord.AddItem("NSW")
  xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("Pen")
  xRecordItem = xRecord.AddItem("SA")
  xRecordItem = xRecord.AddItem("20")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("paper")
  xRecordItem = xRecord.AddItem("SA")
  xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("Books")
  xRecordItem = xRecord.AddItem("SA")
  xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("Pen")
  xRecordItem = xRecord.AddItem("WA")
  xRecordItem = xRecord.AddItem("20")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("paper")
  xRecordItem = xRecord.AddItem("WA")
  xRecordItem = xRecord.AddItem("12")
*-------------------------------------------
  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("Books")
  xRecordItem = xRecord.AddItem("WA")
  xRecordItem = xRecord.AddItem("10")
*-------------------------------------------

  xRecord = wndReport.Records.Add()
  xRecordItem = xRecord.AddItem("")
  xRecordItem = xRecord.AddItem("Total")
  xRecordItem = xRecord.AddItem("")
  
  xRecordItem.Format = "%d"
  xRecordItem.Caption = ""
  xRecordItem.Formula = "SUM(R0C2:R9C3)"
  xRecordItem.Editable = False
    
*******************************
*************************************

  xRecordF = wndReport.FooterRecords.Add()
  xRecordItem = xRecordF.AddItem("")
  xRecordItem = xRecordF.AddItem("Total")
  xRecordItem = xRecordF.AddItem("")
  
  xRecordItem.Format = "%d"
  xRecordItem.Caption = ""
  xRecordItem.Formula = "SUM(R0C2:R9C3)"
  xRecordItem.Editable = False

************************************************
******************************************************************

  
  With wndReport
    .PaintManager.ColumnStyle = 4 &&xtpColumnOffice2007
    .AllowColumnSort = True
    .AllowColumnReorder = False
    .AllowEdit = True
    .FocusSubItems = True
    .ShowFooterRows = true
  EndWith

  
  wndReport.PaintManager.RecOrRowNumber = False
  wndReport.PaintManager.StartRecOrRowNumber = 1
  wndReport.PaintManager.TreeIndent = 40
  wndReport.PaintManager.GroupIndentColor = RGB(255, 0, 0)
  
  wndReport.Populate
  

wndReport.ReCalc(.t.)


-------------
wlcabral


Posted By: wlcabral
Date Posted: 26 March 2010 at 5:33pm
FilterText Property do not Filter Childs Records. It only works at the first Level Records.
 
 


-------------
wlcabral


Posted By: Aaron
Date Posted: 27 March 2010 at 4:14am
Originally posted by wlcabral wlcabral wrote:

FilterText Property do not Filter Childs Records. It only works at the first Level Records. 
 
Hi Walter,
 
Did you set wndReportControl.SortRecordChildren = True ?
 
 


-------------
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: Aaron
Date Posted: 27 March 2010 at 5:11am
Originally posted by wlcabral wlcabral wrote:

Hi Aaron,
 
I sent a request to codejock about a problem with formula in a footerRecord,  The sample is written in FoxPro.
 
SUPPORT REQUEST:

Can I use formula in a footerRecord Item .
 
Hi Walter,
 
I don't think CJ implemented this (yet).
You are able to select every single property and are able to set a value same as a RecordItem but it doesn't show!! (Same as adding childrecords to Footer/Header Records, you are able to add childs and set values for it but don't show either)
 


-------------
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: wlcabral
Date Posted: 27 March 2010 at 11:22am
Aaron
 
The problem was RecordsTreeFilterMode property,  I needed to set this propety at the Init method. 
 
 
RecordsTreeFilterMode = xtpReportFilterTreeByParentAndChildren (Filter by parent and children.)
 
 
Thanks.
 


-------------
wlcabral


Posted By: Aaron
Date Posted: 13 June 2010 at 5:43am
Hi,
 
Seems there are no problems with the features I mentioned. As I said before, I don't use these features so I can't tell if there are problems with it. So once again, please reply if you are having problems...
 
Thanks again
 
 


-------------
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: JamGodz
Date Posted: 28 September 2010 at 11:36am
Hi Aaron,

i have a problem with the footer... it doesn't add a record..

heres my code:

Private Sub Form_Load()
    AddFooterRecord srcControl.FooterRecords, 1, 2, 3, 4
    srcControl.ReCalc True
    srcControl.Redraw
End Sub

Private Sub AddFooterRecord(ByRef Records As ReportRecords, ByVal NetCane As Double, ByVal NetCaneAmount As Double, ByVal LKG As Double, ByVal LKGAmount As Double)
    Dim Record As ReportRecord, Item As ReportRecordItem, i As Integer
    Records.DeleteAll
    Set Record = Records.Add()
    Set Item = Record.AddItem("TOTAL:")
        Item.Alignment = xtpAlignmentRight: Item.Bold = True
    Set Item = Record.AddItem(NetCane): Item.Bold = True
    Set Item = Record.AddItem(NetCaneAmount): Item.Bold = True
    Set Item = Record.AddItem(LKG): Item.Bold = True
    Set Item = Record.AddItem(LKGAmount): Item.Bold = True
End Sub

please help... tnx


Posted By: Aaron
Date Posted: 28 September 2010 at 1:41pm
Hi,
 
I don't see call .Populate in your code???
 


-------------
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: JamGodz
Date Posted: 28 September 2010 at 8:49pm
Hi Aaron,

Thank you again for your quick reply...
sorry i haven't paste correct the code. I've already call the .Populate but still doesn't work..  please have the attached file for my testing project.


Thank you! uploads/5940/MyFooter.zip - uploads/5940/MyFooter.zip


Posted By: JamGodz
Date Posted: 28 September 2010 at 9:17pm
Addendum:

please refer also to my desired output



Thank you!


Posted By: jpbro
Date Posted: 28 September 2010 at 10:43pm
For the fixed footer, you need to set the text using the FooterText property of the ReportColumn object. So something like:


    Set Column = wndList.Columns.Add(0, "Col1", 50, False)
    Column.FooterText = "1"



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: JamGodz
Date Posted: 28 September 2010 at 11:06pm
Hi jpbr,

Thanks.. I got it... but just wanna ask if where would be the best way to implement the footertext, is it posible in BeforeDrawRow event? coz i want to display the total of all SUMSUB in footertext..
please... if you have any code or suggestion..




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