Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Suppressing sections Post Reply Post New Topic
Page  of 2 Next >>
Author Message
andrew
Newbie
Newbie
Avatar

Joined: 11 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote andrew Replybullet Topic: Suppressing sections
    Posted: 09 Jan 2009 at 4:13am

Hi All,

I have a report that needs a fair amount of text to be displayed on a new page after the report has been generated.

As far as im aware, Crystal isnt really designed for this.
 
On the last section of the report, i've setup the selection expert so that it adds a new page after the report completes, and i've set it to 'Not on last record' so the report doesnt show.
 
That all works fine, problem is that some text though is still slipping through such as some text and other blurb.
 
So basically, I wanted to unconditally suppress about 3 or for sections but wanted to know the formula how to do it.
 
So my question basically is, can I supress multiple sections in one part of the report only, and what the code is!
 
Many thanks in advance!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jan 2009 at 7:22am
Hi Andrew,
Let me see if I understand your question.
You have a report with something like:
Report Header
Pager Header
Group header1
Group header2
Details
Group footer2
Groupfooter1
Report footer
page footer
 
and you always want to suppress maybe group header1 and group footer2?
Since you say "unconditionally suppress" you do not need a formula. Use the Section Expert, pick the section you want to suppress and then check Hide (drill down OK) or Suppress (No drill-down) depending on which one you want the report to do.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 09 Jan 2009 at 11:11am
Using the layout that DBlank set up, it sounds like you want to add a section into the report footer section where you can add your additional text etc.  By adding a section you can set the new page before in section expert and you shouldn't need to suppress it at all, since report footer only prints at the end of the report.
 
Are we on the right track?
 
Hope this helps
 
IP IP Logged
andrew
Newbie
Newbie
Avatar

Joined: 11 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote andrew Replybullet Posted: 13 Jan 2009 at 7:12am
Hi Guys,
 
Thanks for your responses.
 
To Clarify...
 
The report im writing is a quote, so it pulls the details out from the database and generates a nicely layed out report for the client to see. It then *must* display 3 or 4 pages of legal terms and conditions afterwards.
 
So to do that, I had it where the report footers had the text and the section expert to 'new page after' on the last part of the report (so the T's & C's would appear on the next page), now this partly works - it goes to the next page and you can see the T&C - however part of the report appears. Which is what I want to suppress, but only on the sections where T&C's are.
 
So from someone viewing the reports perspective they see:
 
Cover sheet (header)
Quote (Details et al)
T&C (footer).
 
Hopefully this clears it up a bit.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2009 at 8:08am
Hi Andrew,
Sorry but I still need a little more clarity in what exactly is the problem.
You state "it goes to the next page and you can see the T&C - however part of the report appears." The entire thing is a report so I do not know what you mean by this. Is it details data, page header information or something else that is appearing. Where is it appearing? Only on the first page, on each of the pages displaying your T&C text? IN preview mode use the section identifiers displaying on the left hand side of your screen to help you figure out what section(s) this unwanted data is coming from. It may help you figure this out.
IP IP Logged
andrew
Newbie
Newbie
Avatar

Joined: 11 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote andrew Replybullet Posted: 14 Jan 2009 at 3:35am
Hi Dblank

Sorry for any confusion, what I mean by the 'report' is the actual data coming off the database and being displayed (as a group), so in my case its the actual quote being displayed. This is spread over about 3 sections max, with static text loaded in afterwards that has the terms and conditions held within. When the report goes to the next page (which should be just the text of the T&C), parts of the group section from above still display - not the data, but the formatting so if we say for example that the report generates:

Name      Price        Quant       Desc
----------------------------------------
A.N Other $2              1           Pen

After the section expert pushes the T&C's onto the next page, It will render like:

Name      Price        Quant       Desc
----------------------------------------

This quote is provided as ......... (rest of mumbo jumbo).

(whereas the 'this quote...' bit should be at the top with nothing else)

So I basically want to supress the section that has the quote descriptions.

HOpefully that makes a bit more sense!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Jan 2009 at 7:58am
Sounds like the you put the "Name    Price   Quant   Desc" labels on your page header which will display on every page. I think you could use a shared variable that would cahnge when the report footer appears on that last pages and then you can sppress on that but I am just now learning about those (from this forum).
Lockwelle can you address this in a variable formula?:
Andrew needs to suppress his page header on all pages after the last detail record runs (which is also set to start a new page on lastrecord).
Please correct me if I am wrong andrew.
Thanks.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 16 Jan 2009 at 11:38am
Sorry, I put a rule on my email and missed these for a few days.  Absolutely, you can suppress just about anything with a formula.
 
Go to the Report Section, for the section you want, the page header and click the button for formulas...x-2 and put in you formula.
 
sorry, didn't read the request that DBlank asked.  Since it is after the last detail, in the same spot described, just enter OnLastRecord... this returns 'true' if the last record has been hit.  True-Suppress the section... it is kindof backwards, but it works
 
Hope this helps.
IP IP Logged
andrew
Newbie
Newbie
Avatar

Joined: 11 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote andrew Replybullet Posted: 05 Feb 2009 at 5:58am
Hi guys, thanks for your responses - and apologies for the delay in me getting back to you (i've been snowed under with work).
 
So with the formula, can I do an If statment? (sorry for the basic questions but im still getting used to using crystal reports).
 
 
Something like
if OnLastRecord = true then
{
[reportsectionx].suppress = true;
[reportsectiony].suppress = true;
}
else
end
 
(replacing [reportsection] for the sections actual name)
 
I know the syntax isnt correct, but am I on the right lines here?
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 05 Feb 2009 at 6:07am
actually, you would do the suppression in the section itself.  In the section expert, for the section you want to suppress, click on the 'x-2' button next to suppress.  For your particular example all you would need is OnLastRecord, and yes, you can do if statements in the formula
 
Hope this helps
IP IP Logged
Page  of 2 Next >>
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.016 seconds.