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

Extra blank lines are being printed on my report.

Status
Not open for further replies.

Blamdude

Technical User
Jan 2, 2008
43
0
0
US
I'm new to Crystal Reports so please be patient with how I explain this.

I'm kinda stuck with using version 6 of Crystal Reports if that makes a difference.

Here is how my details section is laid out.

@partdesc @partqty @partsale @partextended @labordesc @laborextended

All these are lined up horizontally in the .rpt.

Now when I run the report what happens is that @partdesc, @labordesc and @laborextended all start on the same row but @partqty, @partsale and @partextended all get put on a line below @partdesc. This results in a blank spot directly underneath @partdesc wasting space and basically making the report look ugly. I can't seem to figure out why this is happening.

If I just have @partdesc in the details section byitself with nothing else or with just @laborextended there is no blank line below each repetition of @partdesc.

Can anyone shed some light?

Thank you much folks.

dave
 
I have no idea. I've never seen a version earlier than 8.0. It might be called something different--it is wherever you get the fields to add to your report. See if there is a section called special fields (where pagenumber is located).

-LB
 
That proves that there are duplicate records. Right click on each field and see if it has either a checkmark next to "suppress if duplicated" or a conditional formula in that area or in the x+2 formula area for "suppress" like:

{table.field} <> next({table.field})

If you find these, report back.

-LB

 
None of the fields have a check box next to Supress if Duplicated or Supress. There are no formulas in any of the X+2 boxes.

Something else I want to mention is that there is a version of my report that includes the part number being printed in that blank spot underneath the name of the part. It is called @partnumber. In the design view it's basically put right on top of @partdesc but it prints below @partdesc when the report is run. It's formula is

if {PrintSet.partkeyid} = -1 then
""
else
{OrderList_1.partno}

So somewhere in the report that I want to use (version with no part number) there is the accomodation to insert the part number below the part description.
 
Comparing with this formula:

@partdesc
if {PrintSet.partkeyid} = -1 then
{PrintSet.partdesc}
else if ({PrintSet.partkeyid} = -2) then
{OrderList_1.description}
else
"";

Somehow, the partkeyid value is determining the print line. I think you need to start a new report and layout the actual fields in the detail lines (not the formulas), so you can see how the partkeyid corresponds to the other fields. Then maybe you can adjust the formulas so that the layout is corrected.

-LB
 
I'm having a hard time even creating a blank report. I don't know the password for the database which is built using MS Access so I can't connect to it using Crystal Reports.
 
It appears that your data may be stored similar to the following:
Line > Data
1 > Part description
2 > Sales info (qty, price...)
3 > Part description
4 > Sales info (qty, price...) and so on.
Your sales info and part description are in different detail lines. Your one screen shot shows 29 lines returned (detail lines) and you can see the line numbers appear 1 through 29. Each line has either part description data or sales data...not both.
This would be a stretch...but if your data follows that specific pattern...Line 1 = description, Line 2 = Sales Data. You could add a subreport and link line 1 to line 2 by adding 1 to the main report line number.
Formula = Line# + 1. Use this to link to the subreport line#.
Suppress all even line numbers in the main report.
In the subreport, select the sales info and place the subreport in your detail line in the main report. It's a long shot, there is probably an easier method, but it might work.
An easier method would be to look at the data and see if there is a common field to link between detail line data.
EG...
Record Line 1 > PartID(A), description...
Record Line 2 > PartID(A), sales data...
Record Line 3 > PartID(B), description
Record Line 4 > PartID(B), sales data...
If PartID exists in both lines, you can link by this field. Add the same table to the report(alias_1) and link PartID to PartID. This will result in duplicate data and may impact totals. But you can get around that with other techniques.
 
Could i just put a special formula into Supress Blank Section for the Details Section in Section Expert?
 
Hello,
I don't believe that will work. I believe the problem is with your data table(based on looking at screenshot6).
If your raw data looks similar to the following:
Invoice# Part_Desc Line? Qty Sale Extended
000001 Head Gasket 1
000001 2 1 195.00 195.00
000001 Head Bolt 3
000001 4 1 58.21 58.21
000001 Valve Cover 5
000001 6 1 5.10 5.10

Each of these lines would be a detail line on the report. To the left of Qty on the report is what appears to be a line count. The line count (29) matches the record count shown at the top of the screen (29 of 29) in the icon bar. Based on this, it appears that your data for a single part is recorded on two detail lines. One line shows the description and another line shows qty/sale data. If you can verify that your data is recorded over two lines for a single item, it is a start. There are several options for addressing this, some more creative than others.
 
How would I go about verifying if the data is recorded over two lines? I don't have access to the database unless someone can tell me how to hack the password out of an MS Access database. I've tried other programs but they either say that there is no password or give me something that just doesn't work. This is another one of my obstacles.
 
What I can tell you is the location of the various values for the fields in the database.

According to the formulas in the default report...

part description is in Printset.partdesc

The quantity is in OrderList_1.qty, Sale is in OrderList_1.sale and the Extended is just some math it seems multyplying the quantity by the sale amount.
 
Can you take a screenshot of the table linking structure and post it? I'm not familiar with CR 6, but it hopefully gives you some visual of the tables and how they are linked. I don't understand...If you don't have access to the Access DB, and cannot connect to it, how are you running any report?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top