Not displaying based on data present?

I have a Group header in my report that prints out the Schedulable User Notes from …
reportDataSet1 - WorkorderHeader.LT_Client_Label_TechNotes

I would like to set it so that if there are no schedulable user notes then the Group Header will not print. I thought the following might do it for a pre print script in the Group header:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
//Don’t print band if there is no data:

object o=DetailReportItem.GetCurrentColumnValue(“LT_Client_Label_TechNotes”);

System.Guid g=(System.Guid)o;
e.Cancel=true;//cancel this print event

BUT … It prevents anything from printing even when there are notes. Could you please provide the right sytax for me?


As requested in this Report Template forum section, if you would a question about a custom report template, do always attach a zipped export of your report template so that I can see exactly what is occurring with your report template.

  • Joyce

I am not sure why you have to see the report as the question is straight forward? I prefer not to submit the reports as it foes have my company specific details etc in it. Is it not possible to simply answer the question?

Does anyone else happen to know of the right syntax on this one for me?

Thanks kindly.