Print Page | Close Window

Detail or Summary Report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21970
Printed Date: 03 May 2024 at 6:07pm


Topic: Detail or Summary Report
Posted By: Dee37
Subject: Detail or Summary Report
Date Posted: 18 May 2016 at 3:35am
Hi

I have a report which is grouped by Sales Person with total number of orders processed, total value etc. Below this group header is the details section which shows the individual orders per person.
I was aiming to have the user select either a Detailed or Summary version of the report on the prompt screen so that the orders are not displayed if they select Summary but I can't get this working. I created a new Parameter and gave it Detail and Summary Values. I then went into the Details section, checked Supress No Drill Down and clicked on the formula button. I was under the impression that I needed to add something like
{?SummaryorDetail}="Summary". I already have a conditional suppression in this section - {sophead.flag_delete}=2 which suppresses voided orders.
Any help greatly appreciated.



Replies:
Posted By: Valert16
Date Posted: 19 May 2016 at 1:16am
All you say seems quite correct. The code in the formula for suppressing the details should be like this (Crystal syntax):
{?SummaryorDetail}="Summary" OR {sophead.flag_delete}=2
I don't see any problem with this code. If it doesn't show what you expect, please, can you explain what is not working?


Posted By: Dee37
Date Posted: 19 May 2016 at 2:46am
Hi

If the report is to be run displaying detail i.e. sales orders processed, then I need it to suppress any orders with a flag_delete status of 2 (Void). If the report is to be run just as a summary, i.e. just displaying the sales persons name, number of orders processed and total value, then I need all of the sales order detail to be suppressed. Just can't seem to get this working. Many thanks


Posted By: Dee37
Date Posted: 19 May 2016 at 3:18am
Ah, I seemed to have cracked it myself!
Section Expert / Details / Tick Suppress / Formula:


{sophead.flag_delete}=2 and {?Summary or Detail} = "Detail"
or
{?Summary or Detail} = "Summary"

Seems to work anyway!


Posted By: DBlank
Date Posted: 19 May 2016 at 3:51am
FYI- you should be OK in this specific case but generally you want to use parenthesis in your formula to group the 'and' parts from the OR

({sophead.flag_delete}=2 and {?Summary or Detail} = "Detail")
or
{?Summary or Detail} = "Summary"   


Posted By: Dee37
Date Posted: 19 May 2016 at 4:07am
Thank you


Posted By: DBlank
Date Posted: 19 May 2016 at 4:17am
Also for future reference have you considered using 'drill down' functionality?
Rather than creating the parameter you can just set the details to "Hide(drill down OK)" which starts the report as suppressed but allows the user to double click on the group to drill into the details.
In this report you can also set the details suppression criteria in "Suppress (No Drill-Down)" to {sophead.flag_delete}=2 to always hide those rows.


Posted By: Dee37
Date Posted: 19 May 2016 at 4:56am
Not tried this method before but I will give it a go on my next report. Thank you so much. This is a great forum.


Posted By: Valert16
Date Posted: 19 May 2016 at 6:36am
Hi Dee37,

Glad you have it. But I'm curious about your formula:

{sophead.flag_delete}=2 and {?Summary or Detail} = "Detail"
or
{?Summary or Detail} = "Summary"

If I'm not wrong, this formula gives exactly the same results that the one I've suggested in my answer (and it's shorter):

{?Summary or Detail}="Summary" OR {sophead.flag_delete}=2

So I don't see why it doesn't work. Can you confirm it really doesn't work?


Posted By: Dee37
Date Posted: 14 Jun 2016 at 2:34am
Apologies, been away for a while.
Your original suppression formula {?SummaryorDetail}=”Summary” or {sophead.flag_delete}=2 works perfectly.
Originally when I tried it, for some unknown reason, voided orders were displaying when I chose the “Detail” version.
Only difference between now and a month ago when running Crystal is that I have had messages today such as: “The database file sophead has changed, proceeding to fix up the report” and “This report uses an invalid printer – Default printer will be used instead”.
No end of strange things happen with our software so nothing surprises me!
Many thanks for your help.



Print Page | Close Window