aliandro23
Posts: 8
|
| Posted: 07/03/2008, 2:00 AM |
|
is there a way to show the header(that has the field names) more than once on a page so if i have 100 records i want it to show every 20 records or so, is that doable?
so
Header
record
record
...
header
record
record
record....
header
...etc
|
 |
 |
Oper
Posts: 1195
|
| Posted: 07/03/2008, 4:14 AM |
|
yes,
i dont use PHP
but you just ahve to insert the needit <TD><TR> with the hader on before show row.
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
aliandro23
Posts: 8
|
| Posted: 07/03/2008, 4:17 AM |
|
So if i insert that how do i tell it how many times to show it and where do i tell it every how many records to show it?
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 07/03/2008, 7:56 AM |
|
Hi Aliandro
Is this a report?
There is a way to cause this to occur. Take a look at the before show events for the header in question for your report.
You can't accomplish this is the HTML since the entire report is generated in the php code.
If you take a look at the code generated for reports in the main file script, you will see where calls to events are made. Pick the header you want the break to appear and return some value to cause the values to be re-printed.
The report code is convoluted but by looking closely you should be able to see where to do it.
I had to do something similar. I wanted to cause a page break between groups. I can post that code if you want but it is not exactly what you are trying to do.
Have fun.
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
m1l
Posts: 4
|
| Posted: 07/03/2008, 10:59 AM |
|
It's doable but not recomended for something with more than a few columns. You also have to know what the HTML is that the form is creating, know a TD from a TR and be able to work out what putting the code in will do to the HTML page. You can also put in code to force a page break when the HTML is printed by on the 20th record doing
<p style="PAGE-BREAK-AFTER: always"></p>
To the above you do have to close the </table> so adding complexity but if you want the HTML to be printed it can be worth it.
I've done it before by using the beforeshowrow event of the record, then in there having something like this (warning, this is not pretty but works )
$record = CCGetSession("myRecord", 20);
if ($record==20)
{
// create your html here and put it into a field using SetText
CCsetSession("myRecord", $record + 1);
}
else
{
// probably some </td> and/or </tr> and put into a field using SetText 
CCsetSession("myRecord", 1);
}
|
 |
 |
|