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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying blank details sections 1

Status
Not open for further replies.

sewilj

Technical User
Apr 30, 2003
53
GB
Good Morning!

I have an interesting query. I have to generate a report which will diplay 15 detail sections per page. I have created my report (v8.5 to SQL) so that only 15 lines are displayed per page but on the final page unless there are 15 sets of data I get a reduced number of sections.

Does any one know of a way to force Crystal to display a set number of detail sections whether or not there is data there to fill the sections?

Thanks

Lewis
United Kingdom
 
an easy way may be to place a text box in each of the sections, don't know if you can leave it blank or you may need to add a space or white formatted text.

HTH

Gary Parker
Systems Support Analyst
Manchester, England
 
GJParker

I don't think I explained things clearly. The report only has one detail section, and is formatted so that only 15 detail sections of data will fit on one page, plus the page header and footer. However, on the last page where there might only be 7 items, as you would expect there will only be 7 detail sections. What I would like is that the report is forced to always have 15 detail sections, therefore 7 lines of data and 8 blank lines? If I can force the report to always contain 15 detail lines per page, irrespective of the number of lines of data then it will not matter if I have 1 set of data or 15,000 sets, the report will always have 15 detail lines per page.

:)


Lewis
United Kingdom
 
Ok then in your example what would be displayed in the other 8 detail lines ?



Gary Parker
Systems Support Analyst
Manchester, England
 
In the final 8 detail sections NO data is displayed. I have drawn a set of 3 boxes into the details section in which data is added. When no data is there I want the details section to generate and leave the boxes blank.

I am just experimenting with inserting an image into the report and getting the data to overlay the image. Not sophisticated but it might work.


Lewis
United Kingdom
 
Unfortunately no joy. I tried to insert an image of the 15 lines of boxes in the hope that the details section will overlay the image - if there is no data then the hope was that it would leave the the image and therefore the boxes blank. But because the image is larger then the detasil box I can not get it to overlap from teh details section to the page footer. I jus tend up with one line of data and 1 large image on each page.

Back to the drawing bored....

Lewis
United Kingdom
 
Maybe you could use that method in conjunction with expanding the detail section on the last page by doing the following:

Create two formulas:

{@resetcntperpage} to be placed in the page header:
Whileprintingrecords;
numbervar cntperpage := 0;

{@cntonlastpage} to be placed in the details section:
whileprintingrecords;
numbervar cntperpage := cntperpage + 1;

if onlastrecord and
cntperpage < 45 then
replicatestring(chr(13),45-cntperpage)

Then select this formula->format field->common and check &quot;Can Grow.&quot; This will extend the details section to 45 lines. You can see that this has occurred by looking in the gray area to the left where the details section is identified by &quot;D&quot;. You could also add text to see how this working, replacing &quot;chr(13)&quot; with '&quot;extralines&quot;+chr(13)'.

However, any boxes added into the details section will appear as one long box for the last detail. So if you can insert the boxes as an image in the report header and underlay following sections, this approach might work.

-LB
 
Explain in detail just what you are trying to do...

It sounds to me that you are generating a report that gives 15 records per grouping except for some unknown reason you are unable to generate 15 records on the last group.

You don't say how or if the report is grouped...sounds to me as though the report is not grouped at all.

Sounds also to me that the &quot;7&quot; missing sections is just a function of your current dataset....next data set could have 6 missing sections or 2 missing sections...

You should be more specific in your problem description so we can understand it.




Jim Broadbent
 
Lbass

Thanks for the advice, I'll let you know how it goes!

Jim

Sorry if I have not made things clear enough. Hopefully this will help. What I am trying to achieve is as follows. The department I work in has to fill out manual records to request further information on the case they are looking at. The report that they manual fill in contains 15 lines which they can use to request 15 manual sets of information. This obviously is time consuming given that the numbers can be thousands over the space of a few weeks.

What I am trying to do is to re-produce the manual form in crystal and allow the user to progress each case they require information for to a particular state. This is done through a windows front end application to an SQL DB.

The report will then select all the cases at the current state and output the request information into the report. There are no groups in my report and I have managed to replicate the manual form perfectly. I have sized the report in such a way that only 15 detail sections will fit on one page. The page header and footer are used to contain items such as scanned signatures, date marks etc... The details section contains a series of 5 drawn boxes next to each other which contains the data.

When I run the report it outputs 1 detail line per case. Here lies the problem - as long as the number of cases at the particular state is divisible by 15 each page produces will have 15 detail sections. You are quite right when you say that the next data set might have 6 or 2 sections missing. Once I have produced the report I will move all the cases to a new state which shows that the report has been output and the information request has been sent.

However, if the number of cases is say 20, I get the first page with 15 detail sections and the second page will only contain 5 detail sections. I understand that this is the way Crystal is designed to work but I imagine that there must be a way to force the final page to contain 15 detail sections, 5 filled out, 10 blank. The overall effect on the last page would be that the page would still look as though there is 15 detail sections - 5 filled out, 10 blank. If it helps to make more sense I can email you the report!


Lewis
United Kingdom
 
Ok...so it is as I expected...there is nothing magic about having 7 blank spaces

I would do it this way.

I would create 15 detail sections...identical to the one that you currently have

so your report will look like this

Pageheader
Detail A
Detail B
...
Detail N
Detail O
PageFooter

In PageHeader I would put the following formula

//@Initialize (Placed suppressed in PageHeader)
WhilePrintingRecords;
NumberVar Flag := 0;

In the Detail A I would put this formula

//@UpdateFlag (placed suppressed in Detail A)
WhilePrintingRecords;
NumberVar Flag;
Flag := Flag + 1;

Now in the Section expert for each Detail section place the following formulas in the &quot;Conditional Suppress&quot; as directed

In Detail A

EvaluateAfter(@UpdateFlag);
NumberVar Flag;
Flag <> 1;

In Detail B

WhilePrintingRecords;
NumberVar Flag;
Flag <> 2 and not(onlastrecord and Flag < 2);

For sections C to O the formula would be the same as that of Detail B except the number would be incremented accordingly

eg. Detail C would be

WhilePrintingRecords;
NumberVar Flag;
Flag <> 3 and not(onlastrecord and Flag < 3);

I think this might work if I haven't screwed up my boolean logic :)


Jim Broadbent
 
Jim

I have followered your suggestion and have found that I only receive 15 detail sections within my report. I have tried playing around with what you gvae me but I have had no joy.

Thanks

Lewis
United Kingdom
 
lbass

I have added your suggestions to my report but this did not help. I have however played around with your suggestion of adding the image to the report header and underlaying the following sections. Using this I have been able to get what I am after.

Many thanks for all your help Jim and Lbass!

Lewis
United Kingdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top