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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report, Subreport and Parameter

Status
Not open for further replies.

durug

Technical User
Mar 22, 2002
335
CA
Hi everybody!

I have a Order Report that has a linked subreport to it through the SupplierID parameter. The subreports contains SupplierID and SupplierName. Each SupplierID can have more SupplierNames.

I created in the subreport another parameter called SupplierName.

I would like when I refresh the main report to bring me data after entering the SupplierID and SupplierName Parameters.

The problem that I have is: if I enter a non valid SupplierName the Order Report is filled with the order information recording to the SupplierID Parameter and the subreport is empty. But what I need is: if the SupplierName is not corect(not coresponding to the SupplierID) don't display any data in the main report.

Can anybody help me,please?

Thanks,
Durug
 
Or lets say it less complicated:
can I make the main report to not show anything if a column from the subreport (which is not the linked column) doesn't have any value?

Thanks
 
Hello,
The only way i could see doing this would be to use a stripped down version of the subreport, placed into the report header that passed a shared variable to the main report. you could then conditionally suppress the sections of the main report based on the return of your shared variable.. ie: have the variable return a 1 for data and 0 for no data and suppress the main report sections when the shared variable is a 0.
Hope this helps
-Bruce Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
Thanks,
I changed the logic using a stored procedure for the main report where first I check for the values that exist in the subreport. If empty then don't return anything.

Thanks anyway. By the way what means "stripped down version of the subreport"

Regards,
Durug
 
A stripped down subreport would have all unneeded formulas/formatting/ fields removed from it, providing only enough information needed to populate the shared variable, plus you would shrink it down to the point where it would not be noticed within the main report.
-Bruce Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top