Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Detail or Summary Report Post Reply Post New Topic
Author Message
Dee37
Newbie
Newbie
Avatar

Joined: 17 Feb 2016
Online Status: Offline
Posts: 8
Quote Dee37 Replybullet Topic: Detail or Summary Report
    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.
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet 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?
IP IP Logged
Dee37
Newbie
Newbie
Avatar

Joined: 17 Feb 2016
Online Status: Offline
Posts: 8
Quote Dee37 Replybullet 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
IP IP Logged
Dee37
Newbie
Newbie
Avatar

Joined: 17 Feb 2016
Online Status: Offline
Posts: 8
Quote Dee37 Replybullet 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!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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"   
IP IP Logged
Dee37
Newbie
Newbie
Avatar

Joined: 17 Feb 2016
Online Status: Offline
Posts: 8
Quote Dee37 Replybullet Posted: 19 May 2016 at 4:07am
Thank you
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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.

Edited by DBlank - 19 May 2016 at 4:17am
IP IP Logged
Dee37
Newbie
Newbie
Avatar

Joined: 17 Feb 2016
Online Status: Offline
Posts: 8
Quote Dee37 Replybullet 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.
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet 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?
IP IP Logged
Dee37
Newbie
Newbie
Avatar

Joined: 17 Feb 2016
Online Status: Offline
Posts: 8
Quote Dee37 Replybullet 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.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.015 seconds.