Draw Line using Code
Hello,every one. I need somebody's help.
The problem : I want to draw one line per 5 lines in the Data of the Group Header.frx which using in Demo.exe.
The Code I have wrote underline:
private void Data1_BeforePrint(object sender, EventArgs e)
{
int lien = ((Int32)Report.GetVariableValue("Row#"));
if(lien == 5)
{
// the last code is error!
//LineObject LineTemp = new LineObject();
//LineTemp.Draw(null);
}
The problem : I want to draw one line per 5 lines in the Data of the Group Header.frx which using in Demo.exe.
The Code I have wrote underline:
private void Data1_BeforePrint(object sender, EventArgs e)
{
int lien = ((Int32)Report.GetVariableValue("Row#"));
if(lien == 5)
{
// the last code is error!
//LineObject LineTemp = new LineObject();
//LineTemp.Draw(null);
}
Comments
The easier way is to put the line on a band in the designer and use the BeforePrint event to show/hide it:
private void Data1_BeforePrint(object sender, EventArgs e)
{
int lien = ((Int32)Report.GetVariableValue("Row#"));
Line1.Visible = lien % 5 == 0;
}
But I still want to know how to draw line in code.
Could you tell me how to use "FastReport.LineObject.Draw(FRPaintEventArgs e)"?