Crystal Report - Form with Gridlines

I've created a report that is a Bill of Lading.  I can get the group header, detail, and page footer sections formatted the way I need.  If you look at the attached PDF, you'll see that the gridlines work well when there are records, but I need to backfill the blank spaces with gridlines as well.

Any ideas would be appreciated.  By the way, this is Crystal v10.
quotev3.pdf
mdepasqualeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wykabryanCommented:
The easiest way to do this is not to format each column but rather draw the lines on the report.
so what I would do is remove all the formatting on each of the column with regard to the lines, then go to the insert>line and draw each line. It is much more flexible and you dont have to worry about if there is data.
0
mdepasqualeAuthor Commented:
That's actually the way I did it.  The problem isn't in the column lines, but the row lines.  I have a line in the detail group under all my fields.  The problem is when I have  only a couple of rows of data, it only draws the lines under the rows with data and doesn't fill all the way into the page footer.
0
wykabryanCommented:
Unfortunately without something being there you will be stuck.
0
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

mdepasqualeAuthor Commented:
I was debating calculating the page length and inserting the delta of the length with the number of rows and inserting that number of blank lines into the rowset, but I think that's garbage.
0
wykabryanCommented:
That is a lot of work to show lines. Unless it is a user requirement, i have seen many invoices that do not show lines after. The other thing you could do is get rid of the detail lines and color code each line between silver and nocolor.. may look a bit better.
0
mdepasqualeAuthor Commented:
Since I'm working in MS SQL Server and using stored procedures, it's not that bad, just BS.  In fact I already have it inserting lines line I need, but I feel like an amateur doing it that way.
0
mlmccCommented:
One way you could do it would be to have the SP "manufacture" blank records so you always return say 30 records.

mlmcc
0
wykabryanCommented:
I was thinking that mlmcc but I do not know how I would do that.. you would almost need to build a temp table or something and do an insert of null.. or something.
0
mlmccCommented:
I don't know either unless you counted the records and added a loop in the SP to just add records.  Not sure that is possibe.

mlmcc
0
mdepasqualeAuthor Commented:
mlmcc - That's exactly what I ended up doing.  I was already using a temp table, so I just counted the rows and added blank rows for the difference between the count and 33 (the magic number for this form).  I always knew that I could do that, but like I said above, I think that's BS and was hoping someone had a more elegant solution to use the next time.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mdepasqualeAuthor Commented:
Here's the code snippet I used in the proc.  Feel free to steal and reuse - just remember to create the temp table and declare the variables.

-- Blank Lines
insert into #lines
 (SOKey, TranNo, SalesAmt, LineCount)
select
  SOKey,
  TranNo,
  SalesAmt,
  COUNT(*)
from
  #temp
group by
  SOKey,
  TranNo,
  SalesAmt

select @iLup = 1
select @iCount = MAX(SeqNo) from #lines

while @iLup <= @iCount
  begin

    select @iLineLup = 1

    select
      @iLineCount = LineCount,
      @iSOKey = SOKey,
      @cTranNo = TranNo,
      @nSalesAmt = SalesAmt
    from #lines where SeqNo = @iLup

    while @iLineLup < (33 - @iLineCount)
      begin

            insert into #temp
             (SOKey, TranNo, SalesAmt, SalesProdLineID)
            values
             (@iSOKey, @cTranNo, @nSalesAmt, 'zzzzz')

            select @iLineLup = (@iLineLup + 1)
        end

    select @iLup = (@iLup + 1)
  end
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.