I’m not a Crystal Report Expert. This article is for newbie only. You can read this article in Indonesian Language too here.
I’ve faced this problem two days ago. If there is any extension data, I have to show it in my report where the number of extension table(s) = extension data.
So, I’ve to put the extension data in a datatable, and locate its fields in Details section of my Crystal Report Designer.
As its behaviour, when the datatable has 4 records, 4 extension tables printed in my report. When it is 3 records, 3 tables printed.
Okay. That’s perfect!! When it is N record(s), N table(s) printed. But I don’t know why. When the datatable empty, N = 0, it printed empty table.
My boss warned me not to display this extension table template.
I’ve browsed report document object properties to find a property which could hide details section, but failed to find the associated property.
I’ve googled this problem for hours, but failed to find a solution.
So I tried to solve this problem on my own creativity.
I made two Crystal Report Template (rpt files): Report.rpt and Report_noExtension.rpt.
Report_noExtension.rpt is copied from Report.rpt but with little modification to Detail Section.
Right click on detail section à Section Format à select Details in Section Expert à check Hide (Drill-Down OK) option.
Yeah..!! I can hide this section in Report Designer only.
ATTENTION!! IF YOU CAN DO THIS MODIFICATION IN C# 1.1, PLEASE TELL ME HOW TO DO THAT.
Change this code
Dim rpt As New ReportDocument
rpt.Load(ROOT_RPT + “Report.rpt”)
rpt.SetDataSource(ds)
to be
Dim rpt As New ReportDocument
If datatable.Rows.Count = 0 Then
rpt.Load(ROOT_RPT + “Report_noExtension.rpt”)
Else
rpt.Load(ROOT_RPT + “Report.rpt”)
End Ifrpt.SetDataSource(ds)


hey i have a similar problem where i cannot display summary – count when there are no details generated in report. i cannot seem to view reply to the post.
help!