Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numbering Headings

Status
Not open for further replies.

Muqsit83

Technical User
Jul 14, 2008
11
GB
Hi,

I am new with Crystal reports and I needed some help on a query that I am trying to build. The report works with VB, on the forms I have a tick boxes that give me the option to select which sections I want in the reports, I have managed to set this up by allowing suppressions of sections which I don’t want in the report.
Currently the problem I have is each sections heading is numbered,
Ie 1.Pre-requisits
2.Vendor Software
3.Internal Software
4.Problems fixed
Now the problem arises if the user select on the tick boxes to insert section vendor Software and problem fixed, on the report it will appear as
2.Vendor Software
4.Problems fixed
I need a query to display Number 1 & 2 to make logical sense to the headings.
 
Please explain whether these four headings are instances of one group or what exactly these "sections" are. Also, would it be satisfactory to simply remove the numbers?

-LB
 
These 4 headings at the moment are headings for sections I have created.

These numbers are neccessary as I am converting a current report which is done manually with heading and subheading and the company wishes to keep the report format.

May it be better if I change the sections into Groups?
 
Please identify the sections (e.g., report header, group header, detail, detail_a, detail_b, group footer, report footer, page header, page footer) which contain the heading and subheading.

-LB
 
In addition to responding to my previous post, it would help to see the content of the formulas you are using to suppress the sections, because an alternative method might make the renumbering easier.

-LB
 
As this the the first report I have designed, the headings are set out as details a= Pre-requisits
details b= Vendor Software
details C= Internal Software

etc etc

The formula used to supresses the section is under section expert>Supress(NO Drill-Down)

if {ClearQuest.prereq_tab}= 'N' then TRUE;

LB- I really appreciate your time

Ash
 
I don't have a sense of what is going in these sections. If you literally mean your "headings" are text boxes, then what is the content of the related data you want to display? Are the following different instances of one field? Or are they separate fields?

1.Pre-requisits
2.Vendor Software
3.Internal Software
4.Problems fixed

I think it would be most helpful if you showed a sample of data after placing your fields in one detail section, with each field labeled. I can't really help until I understand your data better.

-LB
 
Hi,

I am following different fields for each. See the design report attached to make more sense of what I am trying to achieve. So as a normal report I want the Headings incremented according to what is selected.

Let me know if you can view the design

ASH
 
 http://www.4shared.com/file/55394202/a24e917c/Sample_Report_Design.html
You have shown me a word document that shows only labels. That doesn't tell me anything about your data. But if your report is working as desired and you only want to change the numbering, then create 4 separate formulas that will be used to increment the counts across detail sections (ordinarily detail sections a,b,c,d would carry the same recordnumber) and build in the suppression criteria:

//{@cnta} for detail_a:
whileprintingrecords;
numbervar cnt;
if {ClearQuest.prereq_tab} <> 'N' then
cnt := cnt + 1;
totext(cnt,0,"")+"."+"Pre-requisites"

//{@cntb} for detail_b:
whileprintingrecords;
numbervar cnt;
if {ClearQuest.vendor_tab} <> 'N' then
cnt := cnt + 1;
totext(cnt,0,"")+"."+"Vendor Software"

The variable name "cnt" should be the same in each formula. Repeat for cntc and cntd, and place each formula in the correct detail section.

-LB
 
That looks great, I think we are nearly there, I have applied the Above query, it come back with " The result must be Boolean".

Also when Applying the above query, do I need to place a tag in the sections area so it looks at the query and applies the increment to the section?

Thanks

ASH
 
These are not queries. These are formulas created in field explorer->formula->new to be placed in the detail_a, detail_b, detail_c and detail_d sections. These formulas are intended to replace the headings you currently have in those sections.

-LB
 
Fantastic LB, that works great.

Just a final refinement. Now the headings are in section 2 on the real report. So Pre-requisits should be 2.1(section 2 part 1), How can I modify this query to show this?

Ash
 
Are they ALWAYS only in Section 2? What IS section 2, since this is not a CR term?

You should lay out your requirements in your initial post.

-LB
 
Apologies, its the mangements who after reviewing the report have requested an ammendment to the report.

At the moment Introduction section is with the heading number 1.

The sections as stated above(1.pre-req,2.Vendor Software,
3.Internal Software ,4.Problems fixed) are all under heading number 2 of the report.


So the report will look like the following

1- Introduction

2- Application Software
2.1.pre-req
2.2.Vendor Software,
2.3.Internal Software
2.4.Problems fixed
 
Just add a "2." at the beginning of the string in each formula:

//{@cnta} for detail_a:
whileprintingrecords;
numbervar cnt;
if {ClearQuest.prereq_tab} <> 'N' then
cnt := cnt + 1;
"2."+totext(cnt,0,"")+"."+"Pre-requisites"

-LB
 
Great- Just as I wanted.

Thanks a million for your help

ASH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top