| |
|

ActiveReports for .NET Support
Started by klimia at 02-18-2010 2:27 PM. Topic has 7 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
02-19-2010, 4:46 AM
|
PrantikS
Joined on 12-11-2008
Posts 1,644

|
Re: Detect when new column starts
|
|
|
|
|
Hello,
The beforeprint event of a section would give you the exact height of the controls and the section that is starting to get rendered. Please take a look at this help document regarding the events of a section.
However, please let us know the exact issue that you are facing. Do you need the sections to keep together? You may utilize the keeptogether property of the section for this purpose.
Regards, Prantik
|
|
|
|
|
Report
|
|
|
|
02-19-2010, 12:30 PM
|
klimia
Joined on 05-24-2008
Posts 42
|
Re: Detect when new column starts
Attachment: columns.jpg
|
|
|
|
|
I know heght of the detail section. The problem is - i don't know if it goes to the first or to the second column. I use following code (you can see result in the attachment):
private float _currHeight = 0F; private float _currHeight2 = 0F; private float _DetailHeight = 8.4F;
private void rptEmployeeTransactions_PageEnd(object sender, EventArgs e) { float Y1 = this.PageSettings.Margins.Top + pageHeader.Height + gpHeader.Height + _currHeight; float Y2 = this.PageSettings.Margins.Top + pageHeader.Height + gpHeader.Height + _currHeight2;
this.CurrentPage.ForeColor = System.Drawing.Color.Black; this.CurrentPage.PenStyle = DataDynamics.ActiveReports.Document.PenStyles.Solid; this.CurrentPage.PenWidth = 1; this.CurrentPage.DrawLine(lnBottom.X1 + this.PageSettings.Margins.Left, Y1, lnBottom.X2 + this.PageSettings.Margins.Left, Y1); this.CurrentPage.DrawLine(lnBottom2.X1 + this.PageSettings.Margins.Left, Y2, lnBottom2.X2 + this.PageSettings.Margins.Left, Y2); }
bool _IsFirstColumn = true; private void detail_AfterPrint(object sender, EventArgs e) { if ( _IsFirstColumn && (_currHeight + detail.Height <= _DetailHeight)) { _currHeight += detail.Height; } else { _IsFirstColumn = false; _currHeight2 += detail.Height; } }
private void rptEmployeeTransactions_PageStart(object sender, EventArgs e) { _currHeight = 0; _currHeight2 = 0; _IsFirstColumn = true; }
|
|
|
|
|
Report
|
|
|
|
02-22-2010, 2:12 AM
|
PrantikS
Joined on 12-11-2008
Posts 1,644

|
|
|
Hello,
From the image and the code that you have sent, it seems that you have set the column count of the detail section to 2 and you wish to have a line drawn at below the last record in a page. Please take a look at the attached sample where I have implemented this. The report is connected to the NorthWind.MDB.
Regards, Prantik
|
|
|
|
|
Report
|
|
|
|
02-24-2010, 6:09 AM
|
PrantikS
Joined on 12-11-2008
Posts 1,644

|
Re: Detect when new column starts
|
|
|
|
|
Mila,
Could you send the RPX of the Report, so that I can check this further?
Regards, Prantik
|
|
|
|
|
Report
|
|
|
|
03-18-2010, 6:08 AM
|
SankalpS
Joined on 12-11-2008
Posts 2,587

|
Re: Detect when new column starts
|
|
|
|
|
Mila,
Unfortunately, the Active Reports engine doesn't throw any event for new a new column. Therefore it is rather tricky to detect when a new column starts. You may want to take a look at this forum post which has a similar question and in the meantime, we will try to find some additional information.
Regards, Sankalp
Sankalp Sen GrapeCity- DataDynamics
|
|
|
|
|
Report
|
|
|
|
|
GrapeCity » Product Support » ActiveReports f... » Re: Detect when new column starts
|
|
|
|
|