Code:Dim scSection As CRAXDRT.Section Dim strTitle as String 'strTitle is the title to be appeared in the report strTitle = "Report between 01-05-2003 and 02-05-2003" ' Section5 is the Section number of the Report Header Set scSection = crReportDesigner.Sections("Section5") addTitle scSection, strTitle 'Procedure for adding titles in the crystal reports Public Sub addTitle(scSection As CRAXDDT.Section, strTitle As String) Dim crTitleText As TextObject Set crTitleText = scSection.AddTextObject(strTitle, 200, 120) With crTitleText .Font.Name = "Arial Arabic" .Font.Size = 10 .Font.Bold = True .TextColor = &HFF& .Height = 400 .HorAlignment = crHorCenterAlign .Width = 10000 .CanGrow = True End With End Sub 'strTitle is the title to be appeared in the report ' Section5 is the Section number of the Report Header 'Procedure for adding titles in the crystal reports




Reply With Quote