ActiveReports 2.0 (Visual Basic 6.0) Support

Started by bgw at 06-18-2009 10:31 AM. Topic has 1 replies.

Print Search Rate
Sort Posts:    
   06-18-2009, 10:31 AM
bgw is not online. Last active: 11/10/2009 3:26:22 AM bgw

Not Ranked
Joined on 06-18-2009
Posts 1
Help code doesn't work anymore after upgading to ActiveReport 2.0
I have a section of code that dynamically builds and binds controls on a report. It used to work fine in AR1 but since upgrading to AR2 it goes into a endless loop when executing the run method on the report
%%%%%% Code Follows %%%%%%%%
With DetSection.Controls
Set ctl = .Add("DDActiveReports.Field")
ctl.Name = Prefix & "Field" & iCount
ctl.Top = iTop
ctl.Width = fld1.Width
ctl.Left = iPos
ctl.Height = fld1.Height
ctl.DataField = oField.Name
' ctl.DataSource = fld1.DataSource
ctl.OutputFormat = FormatFieldValue(oField.Type)
If IsNumericType(oField.Type) Then
ctl.Alignment = ddTXRight
ElseIf IsDateType(oField.Type) Then
ctl.Alignment = ddTXCenter
ElseIf IsDateType(oField.Type) Then
ctl.Alignment = ddTXLeft
End If
ctl.Width = CurrWidth

End With
%%%%%%%%%%%%%%%%%%%%%
I suspect it has something to do with the datacontrol being commented out. All references to DDActiveReports have been updated to DDActiveReports2. All project references to. Please help I've been chasing my tail for 2 days.
   Report 
   06-19-2009, 12:42 AM
PrantikS is not online. Last active: 3/6/2010 4:24:11 AM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 763

DDStaff
Re: Help code doesn't work anymore after upgading to ActiveReport 2.0

Attachment: Fieldsaccordingtodataindatabase.zip
Hello,

Thank you for your query. In order to resolve the same, please consider counting the number of fields in the datasource and adding fields accordingly. Please take a look at the attached sample in this regard.

Regards,
Prantik


   Report 
GrapeCity » Product Support » ActiveReports 2... » Help code doesn't work anymore after upgading to ActiveReport 2.0

Privacy Policy | Copyright © 1997-2010 - GrapeCity, inc.