| Author |
Message |
jasonlim
Newbie
Joined: 23 Dec 2009
Location: Malaysia
Online Status: Offline
Posts: 6
|

Topic: sub-report blank if main report is blank issue Posted: 23 Dec 2009 at 9:35pm |
|
hey all,
i has a crystal main report embedded with 1 sub-report with both were filter by date range & cust id.
I has an issue when my main report result is blank , the sub-report is also blank even though i has passed a shared variable into it.
how do i show my sub-report result even my main report is blank ??? Please help !!!
[main report ]
filter by : 1/july/2009 ~ 30/july/2009 , cust_id=ABC
shared variable : 1/july/2009 & cust_id=abc
result: Blank ( not transaction for ABC from month jul/09
[sub-report ]
filter by shared variable : <1/july/09, custid=ABC
result: has trans. record but failed show in main report
rgds,
Jas
|
|
^_~
|
IP Logged |
|
|
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 24 Dec 2009 at 6:26am |
What kind of a section is the subreport in? If it's in a group header or footer or in a details section, then the section doesn't get created when your report is blank.
Where is your shared variable coming from? Is it a parameter? Or is it calculated based on data in the main report? If it's calculated from data, then it has no value because there's no data in the main report.
How are you linking the subreport to the main report. Again, if this is based on data in the main report, then there is no data to link on and the subreport won't generate.
-Dell
|
|
|
IP Logged |
|
jasonlim
Newbie
Joined: 23 Dec 2009
Location: Malaysia
Online Status: Offline
Posts: 6
|

Posted: 27 Dec 2009 at 7:33pm |
hi hilfy the shared-variable is from sub-report Group Footer where is a sub-report calculated sum field where formual =Sum(A)-Sum(B) grouping by vendor_id. And, other section in the sub-report was set to Suppress. i has passed 2 shared-variable from Main report ( vendor_id, Date ) so that the sub-report will filter based to the vendor_id & date regardless the main report result is blank. so, is there any way so that i can display the sub-report result when the main-report is blank.
p/s: the sub-report is ok when the main-report result is not blank.
Thanks in advance. Merry Xmas to U !!!
Jas
|
|
^_~
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 28 Dec 2009 at 6:25am |
Are the Vendor_ID and Data parameters into the main report? If so, use the parameters themselves to link to the subreport instead of using shared variables. If there's no data in the main report, the shared variables never get created. I don't believe there's any way around that limitation.
-Dell
|
|
|
IP Logged |
|
jasonlim
Newbie
Joined: 23 Dec 2009
Location: Malaysia
Online Status: Offline
Posts: 6
|

Posted: 28 Dec 2009 at 5:46pm |
hi,
yes, the vendor_id & date parameter is from main report. the purpose i use shared_variable is bcoz i encounter the vendor_id is not passed to sub-report if there is not records found for that particular vendor_id so i shared_variable to stored the vendor_id at main-report group header. and, this shared_variable has created sub-report link.
btw, my main report is filter by vendor_id & date range prompt parameter with grouping by vendor_id.
Please advice. Thanks in advance.
rgds-Jas
|
|
^_~
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 29 Dec 2009 at 6:28am |
What kind of a section is the subreport in? If it's in a Group Header or Footer, then that is what could be causing your problem. If it's in the Report Header or Footer, then I'm not sure what the issue might be.
-Dell
|
|
|
IP Logged |
|
jasonlim
Newbie
Joined: 23 Dec 2009
Location: Malaysia
Online Status: Offline
Posts: 6
|

Posted: 29 Dec 2009 at 5:31pm |
hi hilfy
only 1 group section - vendor_id. and, the calculated sum field , shared_variable were located in the vendor_id Group Footer section.
Please advice, thanks.
|
|
^_~
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 30 Dec 2009 at 6:20am |
But where is the subreport?
Also, because there is no data, the shared variable will never be calculated in this scenario.
-Dell
|
|
|
IP Logged |
|
jasonlim
Newbie
Joined: 23 Dec 2009
Location: Malaysia
Online Status: Offline
Posts: 6
|

Posted: 30 Dec 2009 at 5:33pm |
the subreport was in detail section of the main-report. and then the main-report shared-variable is from group-section.
i has upload the report at
Happy New Year 2010.
thanks in advance
Rgd-Jas
|
|
^_~
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 30 Dec 2009 at 6:47pm |
If you have no data for the main report, the only way the subreport will generate is if the subreport is in the report header or report footer section. In any other section is will not run if there is no data.
-Dell
|
|
|
IP Logged |
|
|
|