[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1618
  • Last Modified:

Set the Detail section height programmatically or otherwise of a Crystal Report designed using the Report designer component in Vb6

Alright here is the situation I have a report that was created in vb6 Crystal report designer component, which is probably closest to crystal reports version 8.0. This report has a detail section which is supposed to be a listing of part  and description. there can be up to 10 details, across two columns with a each detail taking up to 8 lines(can grow property set to 8). Now I understand that there has to be a limit on the number of parts and we are checking prior to creating the report so we don't hit the threshhold and go over one sheet. The problem is I need the overall section height to always be one size, but still need each individual detail Item size to fluctuate. The reason for this is because I have items below the detail section that belong inside a pre-outlined area so I must get the section to always have the same space even with one part /description and the rest area blank. I am really at a loss and upgrading is just not option with a time constraint.
attached is report.

Here is a structure of the code
1.Populate Text objects in header
2.Set record set to report detail   ---  mreport.database.Setdatasource prscomponents
3. Populate the rest of the report downward

Thanks All
  Insert7x10biggermaybefinal10.rpt Insert7x10biggermaybefinal10.rpt
0
mbarazi
Asked:
mbarazi
  • 3
1 Solution
 
mlmccCommented:
Crystal can't do it.  I can't think of a way to do it.

The detail section is used for each record so setting it to the height will just mean each record uses that much space.

mlmcc
0
 
mbaraziAuthor Commented:
The attached report will fluctuate as far as the detail size. When you open it up and go to the detail section layout tab, view the height on the detail size, you will notice it's set to 0.00 and is disabeled or greyed out and I believe the reason for that is so it could grow accordingly per each item detail. My concern is what if there is only 2 parts for the detail section, how do I guarantee that the rest will at least be blank. I tried the following code

.Report.Sections("Section5").height = 1000
.Sheet.SetComprecordSource rsComp
.Report.Sections("Section5").height = 0

Section 5 is the report footer beneath the detail section, I figured I would allocate the space for the footer part, not including the space already used by the template and then that would always end up providing with the same space. But when I change the value for the height from 1000 to anything,  nothing seems to happen to the report.  
0
 
mbaraziAuthor Commented:
I have finally figured it out turns out the report was created as a mailing label and I had to create the report from scratch as a regular crystal report
0
 
mbaraziAuthor Commented:
This is the answer to this issue
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now