Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Supress 2 subrpt based on total calc'd in 2nd subreport.

Status
Not open for further replies.

mpdinosaur

Programmer
Aug 13, 2003
21
0
0
US
Folks;

Is it possible to supress two subreports based on a total calculated in the 2nd subreport? I have to be able to conditionally supress the detail items (subreport 1) and the summary and analysis data (subreport 2) based on net profitability that's not calculated until the end of subreport 2.

Any ideas? I'm using Crystal 8.5 and MSSQL 2000.

Thanks in advance for you help.

MikeTheDinosaur
 
Place the second subreport before the first, shrink it up to a tiny lil thing, and then pass through a shared variable.

Otehrwise you'll have to approach the design in a more sophisticated way, such as creating a database object (View or SP), or using a SQL Expression.

Subreports are generally slow and a bad idea.

-k
 
Thanks for the speedy response.

I still need the 2nd subreport to print after the 1st one, though. How would that work?

Unfortunately, because of the way the boss wants the report to work, the subreports seem to be a necessary evil.

Thanks again.

MikeTheDinosaur
 
You would have to add the subreport twice, once before and once after the first subreport.

-LB
 
Can't you just pass shared variables from the 2nd subreport and display them in the main report's section formated to look exactly like the sub report looks? It would sure be more efficient than having the subreport in there 2 times.

MrBill
 
MrBill;

Unfortunately, subreport 1 contains a detail-type listing showing multiple records which are actually TOTALS by master account of the details listed in the main report by sub-account. Yep. The boss wants the totals FIRST!

Quite a pain for an old Cobol dinosaur.

Thanks for the suggestion.

MikeTheDinosaur
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top