Solved

Subreports Record count

Posted on 2006-07-12
5
589 Views
Last Modified: 2008-01-09
Hi All,

I have a subreport inside a main report . the structure is like

GH1 Invoive No
GH1A Subreport --> Invoice Detail
GF1

Subreport is linked with main report with InvoiceNo

The Group Header 1 contains invoice number
the Group Header 1A contains subreport with Invoice details.

Now i want to suppress the GH1 section of main report if its subreport does not contain any record.

Please help me

regards
Vishal
0
Comment
Question by:vishalgoyal123
5 Comments
 
LVL 5

Expert Comment

by:dkDeveloper
Comment Utility
Hi vishalgoyal123,

I was wondering what your data source is for this report.  Could you include a count of the detailed line items along side the invoice number and then just conditionally suppress when that count is equal to 0?  If not, I'm afraid this might not be possible since the processing of the subreport occurs after the section you wish to suppress.

Good Luck!
dK
0
 
LVL 42

Accepted Solution

by:
frodoman earned 48 total points
Comment Utility
dk is right on the money - you can't suppress one section based on the results of a subreport in a subsequent section.

If you can return the count in your primary recordset that's probably the most efficient.  If not, you may be able to run a separate subreport prior to the section that does not but count the records and share the result with the main report.

frodoman
0
 
LVL 34

Assisted Solution

by:James0628
James0628 earned 47 total points
Comment Utility
Another option might be to eliminate the GH1 section and put whatever was there in the subreport.  Then perhaps the subreport can suppress it if there are no details.  Whether or not that will work will depend on the details of your reports and data.

 James
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now