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

Guide me any way to hide the blank subreport in Main report.

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
Hi,
I'm opening this new thread because, I have to solve this problem in very short period. (I saw previous posts by searching with the "Keyword Search) I couldn't find any solution for this problem.

Using : CR 8.5, SQLserver (SQL server Driver), DB2 (IBMDB2ODBC Driver)

In CR 8.5, how to suppress the SUBREPORT columns which are displayed blank in the Main Report.
(using couple of parameters Empid, position, gender and has the ALL option in the parameters)

For example
In the subreport we are getting the following result
empid position
111 xxxx
333 yyyy
555 uuuu
777 wwww

and in the main report we are getting the result as
(select "ALL" from the drop down for the parameters)

id gender location position (from subreport)
111 m ny xxxx
222 m io
333 f il yyyy
444 m az
555 f oi uuuu
666 f il
777 m mn wwww
888 f ut
999 m IN
....


Needs:

want to suppress the blank one and get the result as
id gender location position (from subreport)
111 m ny xxxx
333 f il yyyy
555 f oi uuuu
777 m mn wwww

Right now we are not worry about the performance, so please guide me in any way to get the result as we need.

Please let me now for more detail.

Thanks
MK

 
You should be able to get rid of the subreport and do a regular link from the employee id to the table with the position. Any records that don't have a position will not show up on the report.

-D
 
You should be able to suppress the rows with empty subreports by using a shared var (placed somewhere on the subreport canvas) from the subreport. Something like:

whileprintingrecords;
shared stringvar position := {@position};

Then in the main report use a section suppression on detail_b (assuming the subreport is in detail_a with underlay following sections checked) of:

whileprintingrecords;
shared stringvar position;
position = "";

You would still have the problem of making the subreport as small as possible, since you couldn't suppress detail_a when detail_b is suppressed and still have the subreport run. But this might get you closer.

-LB
 
Thanks a lot for your suggestion. I'll try this and let you poeple know.
Thanks,
MK
 
I tried, but i couldn't get the result. Help need!!

Thanks,
MK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top