Dear All
I want to draw line programmatically for controls in the detail section in a crystal report depending on the amount of data in 3 controls without merging these controls together, I have a working code in access and it is running excellent and I want to use the same code in crystal report but I do not know where to put the code and how I can deal with codes like for each control in detail.controls
My Code in Access is
1- I can't find the Detail_Print Event in Crystal Report - I use on Load event (I Don't know if this correct or not) 2- I don't know how to refer to controls in the detail section in crystal report like in Access example me.Remarks refers to the Remarks Control in Detail Section in Access Report 3- I don't know how to the height or width of control in crystal report fieldCode:Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Dim MaxHt As Single Dim ctl As Control MaxHt = Me.Remarks.Height + Me.RemUpdate.Height + Me.Client.Height 'Get maximum height of any control For Each ctl In Me.Section(acDetail).Controls If ctl.Height > MaxHt Then MaxHt = ctl.Height End If Next 'Use maximum height to draw rectangles around each control For Each ctl In Me.Section(acDetail).Controls Me.Line (ctl.Left, ctl.Top)-(ctl.Left + ctl.Width, MaxHt), vbBlack, B Next End Sub
I checked the web many times and I did not find exact answers So I need your help
Thanks, Regards


Reply With Quote
