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!

Multiple Detail Bands somewhere other than Center of Report?

Status
Not open for further replies.

dantheinfoman

Programmer
May 5, 2015
131
US
Hi All,

I have an old report that I was handed to revise which has :

Page 1 with Employee and Employer total pay by PayType, Deductions, and Witholdings

Page 2 with Summary of Departments totals for PayType and Withholdings (which I'm supposed to add Deductions to dynamically)

Page 3 is the final page with report totals for all PayTypes, Deductions and Withholdings.

My predecessor did this by using an array for deductions 1 - 16 statically on the page and just hiding rows when empty. The problem is that customers want the number of deductions per department or report to be dynamic or at least have a whole bunch more than 16.


I got it to let me create a detail band and for it to display all records for that department from the relation set to the summary table 'depsums', but it shows up on the bottom of page 1 instead of where I need it on page 2. Is there a way to put detail bands in custom areas instead of in the dead center of the report??

Here are some pics of page 1,2, 3:
Screen_Shot_09-27-16_at_12.48_PM_dgzxbf.gif

page 1 part 2:
Screen_Shot_09-27-16_at_12.50_PM_h8izmk.gif


Page 2:
Screen_Shot_09-27-16_at_07.50_PM_g8fjxy.gif

page2 part 2
Screen_Shot_09-27-16_at_07.51_PM_ebe2yw.gif



Page 3:
Screen_Shot_09-27-16_at_07.52_PM_nx52zv.gif

Page3 pt2
Screen_Shot_09-27-16_at_07.53_PM_wcxmnz.gif



Thanks!!!

Dan
 
Dan,

I might have misunderstood your question, but if you are asking how to start a new page for the second detail band, then all you have to do is to open the band's Properties dialogue (right-click on the band in the report designer and choose Properties), then go to the Band tab, then tick "Start on a new page".

If that is not what you are asking, my apologies. In any case, I suspect you already knew this.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Mike,

VERY HELPFUL! I haven't messed with detail bands much in the past, just copied old reports to make new ones. I was able to get the department deductions to use a detail band dynamically, so there could be 100 different deduction types in a Department and it will work. Now I just need to do the same thing to the last page, the Summary page.

Follow up question: Is there a way to put a detail band in the "Summary" page, instead of only in the middle areas?

Thanks

Dan
 
I think Mike hit the nail. The visual structure of a report in the designer does not reflect pages.

If you want a band to always be on a new page (the same applies to groups and other bands) you do so in the properties of the band. There are several options, but "Start on new page" is exactly what you specify. There was no need to show your report in (no pun intended) all detail here to get to the point, but most probably you interpreted the designer as some WYSIWYG designer. It's not. Your report is quite unique in having many repeating lines per detail band, but then I also see no way to condense the layout as there are some lines with additional side fields.

In contrast to your design, a normal detail band of a simple report might only have one line height and output some record fields. The band therefor is like an iteration body repeated for each records of the workarea driving the band, like in a grid row. Page breaks happen when space is used up, also considering the space needed for footer and such further page bands bound to the end of each page, so then the rest of data is split to next pages, but you don't have a WYSIWYG editing experience like in Word, could you really expect so? The number of rows and thus number of pages can vary a lot.

Despite not being a WYSIWYG editor, the "Start on new Page" band property allows you to do a page break at least on the level of bands, you can't decide for a break within the band, but then would also do like you did and have two detail bands. Side note: What you have at hand here looks much like it's easier done with Word automation to create a Word document than via a report. I'm not necessarily talking of mail merge done from word with a DBF data source (that could be an option), but automating the word object model from VFP code. Hentzenwerke has nice books about that topic.

Bye, Olaf.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top