adisan
August 8th, 2005, 08:06 AM
I am new in CR and I need to now haw to suppress an object in my report.
I write a simplify example to well understand what I want.
Note: I use CR XI.
. . . . . . . . . . . . . .
oCRRep = oCRRun.NewReport
oAdoRS.ActiveConnection = pi.sql.Connection
oAdoRS.Open(selectComand)
. . . . . . . . . . . . . .
CR1 is a class what handle my needs
cr1.PageSetup(cPageSize, cPageOrientation)
cr1.MakeReport1(cAntet, cTitle, cColoane, 320)
MakeReport1 Method
---------------------------
oCRRep.FormulaSyntax= 0
crxReportHeader = oCRRep.Sections.Item("RH")
crxPageHeader = oCRRep.Sections.Item("PH")
crxDetail = oCRRep.Sections.Item("D")
crxReportFooter = oCRRep.Sections.Item("RF")
crxPageFooter = oCRRep.Sections.Item("PF")
crxReportFooter.PrintAtBottomOfPage = .T.
crxPageFooter.PrintAtBottomOfPage = .T.
. . . . . . . . . . . . . .
REPORT HEADER
*************
. . . . . . . . . . . . . .
objReport = crxReportHeader.AddTextObject(cAntet, 0, nTop)
WITH objReport
.Width = INT(xWidth/2)
.Height = INT(230*abtVFont)
.Font.Name = pi.cRapFontName
.Font.Size = pi.nRapFontSize
.Font.Bold = .T.
.HorAlignment = 1
.TextColor = pi.nRapFontColor
.KeepTogether = .T.
ENDWITH
. . . . . . . . . . . . . .
objReport = crxReportHeader.AddTextObject(cTitle, 0, nTop)
WITH objReport
.Width = This.xWidth
.Font.Name = pi.cRapFontName
.Height = INT(250*abtVFont)
.Font.Size = pi.nRapFontSize+1
.Font.Bold = .T.
.Font.Underline = .T.
.HorAlignment = 2
.TextColor = pi.nRapFontColor
.KeepTogether = .T.
ENDWITH
. . . . . . . . . . . . . .
\\ PAGE HEADER
\\***************************************************
. . . . . . . . . . . . . .
Hear are the problem. I want to suppress this object at first page and show him on next pages.
I do not now where and how to write a formula.
objReport = This.crxPageHeader.AddTextObject(cTitle,0,0)
WITH objReport
.Height = 230
.Width = xWidth
.Font.Name = pi.cRapFontName
.Font.Size = pi.nRapFontSize
.Font.Bold = .T.
.TextColor = pi.nRapFontColor
???.Suppress = True or False is not enough…
.KeepTogether = .T.
ENDWITH
. . . . . . . . . . . . . .
Please help me!!!
Thanks a lot,
Ady
I write a simplify example to well understand what I want.
Note: I use CR XI.
. . . . . . . . . . . . . .
oCRRep = oCRRun.NewReport
oAdoRS.ActiveConnection = pi.sql.Connection
oAdoRS.Open(selectComand)
. . . . . . . . . . . . . .
CR1 is a class what handle my needs
cr1.PageSetup(cPageSize, cPageOrientation)
cr1.MakeReport1(cAntet, cTitle, cColoane, 320)
MakeReport1 Method
---------------------------
oCRRep.FormulaSyntax= 0
crxReportHeader = oCRRep.Sections.Item("RH")
crxPageHeader = oCRRep.Sections.Item("PH")
crxDetail = oCRRep.Sections.Item("D")
crxReportFooter = oCRRep.Sections.Item("RF")
crxPageFooter = oCRRep.Sections.Item("PF")
crxReportFooter.PrintAtBottomOfPage = .T.
crxPageFooter.PrintAtBottomOfPage = .T.
. . . . . . . . . . . . . .
REPORT HEADER
*************
. . . . . . . . . . . . . .
objReport = crxReportHeader.AddTextObject(cAntet, 0, nTop)
WITH objReport
.Width = INT(xWidth/2)
.Height = INT(230*abtVFont)
.Font.Name = pi.cRapFontName
.Font.Size = pi.nRapFontSize
.Font.Bold = .T.
.HorAlignment = 1
.TextColor = pi.nRapFontColor
.KeepTogether = .T.
ENDWITH
. . . . . . . . . . . . . .
objReport = crxReportHeader.AddTextObject(cTitle, 0, nTop)
WITH objReport
.Width = This.xWidth
.Font.Name = pi.cRapFontName
.Height = INT(250*abtVFont)
.Font.Size = pi.nRapFontSize+1
.Font.Bold = .T.
.Font.Underline = .T.
.HorAlignment = 2
.TextColor = pi.nRapFontColor
.KeepTogether = .T.
ENDWITH
. . . . . . . . . . . . . .
\\ PAGE HEADER
\\***************************************************
. . . . . . . . . . . . . .
Hear are the problem. I want to suppress this object at first page and show him on next pages.
I do not now where and how to write a formula.
objReport = This.crxPageHeader.AddTextObject(cTitle,0,0)
WITH objReport
.Height = 230
.Width = xWidth
.Font.Name = pi.cRapFontName
.Font.Size = pi.nRapFontSize
.Font.Bold = .T.
.TextColor = pi.nRapFontColor
???.Suppress = True or False is not enough…
.KeepTogether = .T.
ENDWITH
. . . . . . . . . . . . . .
Please help me!!!
Thanks a lot,
Ady