Crystal Reports
--
Questions
--
Followers
Top Experts
It may be of use to know that if there is no stock held in the bulk warehouse the subreport will be blank so ultimately the report will show me a list of stock that needs replenishing from Bulk Warehouse.
Any assistance on this would be greatly appreciated :-)
Many thanks in advance,
AJ
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
What do you need suppressed based on the subreport?
You can't suppress any sections that are before the subreport or the section the subreport is in based on the subreport return. The subreport is the last object evaluated/rendered in the section.
DO you need the group headers suppressed?
WHy are you using a subreport?
mlmcc
In response:
Are you using the subreport to display any other information? The subreport confirms the SKU then gives the Qty and Bulk location code where the stock is located in Bulk
What do you need suppressed based on the subreport? I need the detail line in the main report to be surpressed if there is no info detected in subreport as I'm building a Stock Replenishment Report to get emailed to Goods In.
You can't suppress any sections that are before the subreport or the section the subreport is in based on the subreport return. The subreport is the last object evaluated/rendered in the section. I could insert another detail line and enter the subreport into this section.
DO you need the group headers suppressed? Its the detail line mainly so that all that is reported on is the stock where it is low/zero in Main warehouse but held in bulk warehouse
WHy are you using a subreport? We have a rather complex database and each location has a pick face definition where we state the Min/Max of a product/Sku. Stock info is held in a seperate tables that dont like to be linked so inserting a subreport gets the info we need, I just need to get rid of the detail lines where no stock is in Bulk as currently I have 40 odd pages and would like to reduce this so when Goods in have the finished article all they see is what they need to action.
Thank you for your response, I feel I'm not that far away but cant put my finger on it, i have included a screen shot.
Thank you for your solution, I appreciate your help as I've reached a point where I understand what I'm doing as you have suggested but the report still isn't suppressing as indicated therefore I must have missed something.
Just to recap:
a) I have entered a second detail section, moved the main report details into details b and moved the subreport into details a.
b) I have created a formula in Main report titled SubReportCount, do i insert this into the main report header or on detail line?
c) I have then created a formula within the sub report titled SubReportCount, where if anywhere is this entered in the subreport?
d) When I check the formula's in both reports they are null so I think its here that it falls down. Should either of the formula's contain values?e) Also just to add, when I attempt to suppress the blank section, do I right click on the subreport from the main report and 'format subreport' using the forth tab, there isnt anywhere to enter the suppress formula?

I'm certain this will work, I just need to understand where I'm going wrong :0-)
This is what the report looks like with 2 detail lines, the formulas have been created in both main and sub reports and the next step is to insert the suppress formula:

Many, many thanks in advance,
AJ






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Put in the main report Report Header
>>c) I have then created a formula within the sub report titled SubReportCount, where if anywhere is this entered in the subreport?
The formula in the subreport goes where you are setting the count.
>>d) When I check the formula's in both reports they are null so I think its here that it falls down. Should either of the formula's contain values?
The formula in the main report won't show a value because the formula returns a blank
>>e) Also just to add, when I attempt to suppress the blank section, do I right click on the subreport from the main report and 'format subreport' using the forth tab, there isnt anywhere to enter the suppress formula?
The blank section is suppressed in the Section Expert
mlmcc
If that's an issue, you can handle it by adding a new main report detail section above the section that contains the subreport, and setting the variable to 0 there. That would just reset the count to 0 for each new item, and then if the subreport finds some records, it will update the count.
Just create a formula like the following in the main report, and put it in the new detail section (above the subreport section):
WhilePrintingRecords;
Shared NumberVar subRecordCount;
subRecordCount := 0;
''
mlmcc sort of covered this, but, in case it still isn't clear, the quotes at the end are just so the formula doesn't produce any visible output on the report. You can suppress the new detail section, or set it to "suppress when blank".
James
Below is a shot of the first record the report has detected where stock is in the bulk warehouse, there are lots of records before and after that in theory i shouldn't be seeing. This then continues right to the end and the report is 30 pages long.

My aim is to schedule these to be delivered to Goods In every 4 hours so that it saves time using the client replenishment report which takes time to populate. My end vision is for the report to only show the record in the main report when it detects stock in bulk sub report, so they will get a email containing a list with mainly red records and be limited to a few pages of action by Goods In.
I really do appreciate all comments as I always enjoy finding and learning something new in Crystal :-)
I have shown below how the design of the report looks, I believe I have set it up correctly but if you can spot anything from this do let me know :-)

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
James
If you pick up on anything I may have missed, please could you let me know so I can understand where I went wrong. Thank you for all the input received so far, its greatly appreciated :-)
I've requested to the powers that be that i would probably benefit from more training. I went on a beginner course 2004, self taught the rest with some help from forums :-) If you could advise as to any worthwhile training or literature that would be the icing on the cake :-)
Many thanks,
AJ
I had no formal training.
I do recommend a book by George Peck - The Complete Crystal Reports xx Reference
The SAP/Crystal site has an excellent knowledge base though it is a bit difficult to use and search.
mlmcc






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
I like it when I find something new within Crystal and your help has certainly done that, I think I'll be ordering me a new book real soon!
Thank you once again and if you gain any satisfaction in helping solve crystal problems then I hope your currently feeling that in abundance :-)
[embed=file 1129317]
Thanks, thanks, thanks!!!
You can ask to have the question reopened, and then split the points between us.
James
Many thanks James & mlmcc :-)

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
To reopen the question click the REQUEST ATTENTIOIN link in the question body. It is under to 3 dot menu
mlmcc
For me, it's mostly just about giving credit where it's due. But another factor is thinking of the site as a resource. If someone with a similar problem searches the site and finds this question, you'd want to have the correct posts marked as the solution.
James
mlmcc






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Does anyone know how to choose 2 posts as best solution?
Thanks. I got the impression that things had changed, but wasn't sure.
Andrew,
I'm sure that I've seen it mentioned, but I can't remember the details. mlmcc will know, and I'm sure that he'll give you an answer when he gets back to this question. (I know that this isn't all that helpful, but I didn't want you to think that I was ignoring you :-)
James
Many thanks,
AJ

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
mlmcc
James






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Crystal Reports
--
Questions
--
Followers
Top Experts
Crystal Reports is a business intelligence application from SAP SE. It is used to graphically design data connections and report layouts from a wide range of data sources including Excel spreadsheets, Oracle, SQL Server databases and Access databases, BusinessObjects Enterprise business views, and local file-system information. Report designers can place fields from these sources on the report design surface, and can also deploy them in custom formulas (using either BASIC or Crystal's own syntax), which are then placed on the design surface. Crystal Reports also supports subreports, graphing, and a limited amount of GIS functionality.