Olá,
Eu criei um DetailReport band dentro do Details. Eu não quero imprimir a linha caso este não tenha valor para o DetailReport.
Como alcanço este objetivo?
Hello,
What I have done is I have created a DetailReport band under the details. I have unchecked the Print on empty datasource for both the details and the Detail report. which is working fine on the details report. What I want to do is: if the DetailReport is not being printed I do not want the details to be printed.
How would I do this.
Solução:
Como parte da solução do problema eu vou implementar um código de verificação no evento BeforePrint de DetailReport.
Código:
private void DetailReport_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
if (DetailReport.GetCurrentRow() == null)
e.Cancel = true;
}
private void ReportHeader1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
if (DetailReport.GetCurrentRow() == null)
e.Cancel = true;
}
Para o meu problema, e para a simplicidade do meu relatório, funcionou!
Comentários