Line after 5 rows of data

plannerg

Registered User.
Local time
Today, 19:24
Joined
Oct 19, 2005
Messages
23
Hi,

I know I can create a report whereby I produce a line under each row of data however is it easy to create a report that displays the line after every 5th or so row?

Thanks.
 
Sure, I’ve attached an example. Take a look at Report1. It works like this…

I created a field in report1 called SequenceID. By setting the control source to =1 and then setting the Running Sum to “Over All”, it generates a sequential numbering of the records (regardless of sort order or filtering). We can then use this to identify the fifth records.

Next I created a line under my report fields and called it “FifthLine” (normally this would show under every record)

If you click on the properties for the detail section (the detail bar), you will see I have create some code for the On Format event. If you take a look at the code you will see that it takes the value of SequenceID and uses the MOD function to identify if the record is a 5th record or not. If it is then it makes the line visible. Else the line is invisible.

Hth
Chris
 

Attachments

Hi,

Thanks for that.

Is it possible to generate the autonumber in the query that I base the report on, as opposed to the table?
 
Hi
The autonumber in the table serves no purpose in this solution. I just added it out of habit. Why do you want an autonumber in a query?

BTW, I forgot to mention you can hide the SequenceID field in the report if you prefer.
Chris
 
Hi

Sorry to barge in on your thread, but this is really close to what id like to do!

I to have a report that produces any number of records, in this instance they are Consultations. Each consultation has a Area of Interest so you could get 3 or 4 lines per consultation. I have used the field properties to hide duplicates so it looks fine and doesnt duplicate data.

However, to split each consultation out to make it a bit more readable id like a line under each consultation, but not each detail row.

Is this possible?

Scott
 
Hi

Sorry to barge in on your thread, but this is really close to what id like to do!

I to have a report that produces any number of records, in this instance they are Consultations. Each consultation has a Area of Interest so you could get 3 or 4 lines per consultation. I have used the field properties to hide duplicates so it looks fine and doesnt duplicate data.

However, to split each consultation out to make it a bit more readable id like a line under each consultation, but not each detail row.

Is this possible?

Scott
If I understand you correctly you want to put a line at the end of each Consultation?

The way to do this is to set Consultation as a grouping level in your report. Then you can add a header or footer for Consultation. In the header or footer you can then put anything you line e.g. lines, totals, Consultation text etc

hth
Chris
 
Hi

Thanks for replying, there is a group on Consultation Name set on the report that is set to keep these together as they could span pages.

Im already using the Report and Page Header/Footer so im being dense and not seeing what you are suggesting. I have attached (i hope) a Report.txt file to this post, if you rename the .txt to a .pdf you will see my report.

As you can see there are thin blue lines on the whole report but as you rightly said i would like to see a line under the Consultation Name only (in this instance Dentistry Conference and Surgery Online Questionnaire).

I guess to make it look better it should be above and below the Consultation name to make it stand out a bit better, but that a new story i think!

Scott
 

Attachments

Ok, as it stands you have a line in the detail section. If you do not want lines under each "detail" then remove this line.

Then add a line in the Consultation footer. It doesn't look like you have a footer for consultation at the moment so you see to add it (using the "Sorting and Grouping" icon). Then you can add your line there.

hth
Chris
 
I think that's the problem, i dont actually see a "Consultation" footer you are speaking of and i dont know how to show it.

I hate using Access for reports, its a two second job in Crystal Reports :(

Hopefully ive attached an image of what the design of the report looks like, if you could tell me how to show the actually "Consultation Footer" you are speaking of that would be top!
 

Attachments

  • report.jpg
    report.jpg
    81.2 KB · Views: 134
Ahhhhhhhhhhhhh

I see it now, doh for not reading. Showing that and trying it :)

Edit: Yey, it works. Thank you so much :)
 
Hi Guys,

I think you can hit me again with your expertise, btw thanks (Chris) for the "Crosstab Like Data Entry", anyway I now have a problem formatting the report, below is the table structure:

Case_No Seq_No Auth_Rep
0001 01 John Doe
0001 02 Jane Doe
0001 03 Jhane Doe
0002 01 Jhon Doe
0002 02 Jhonn Doe
0003 01 Jon Doe

As you can see each Case_No can have a maximum Seq_No of up to 3 as Authorize Rep. and a minimum of 1, I tried grouping the data and no luck, got no adequate knowlodge in coding so I'am again stuck.

Now here's the report Format I'm dealing with:

Case No: 0001

John Doe
Authorize Representative I

Jane Doe
Authorize Representative II

Jhane Doe
Authorize Representative III

___________________________________
Case No: 0002

Jhon Doe
Authorize Representative I

Jhonn Doe
Authorize Representative II


Authorize Representative III

________________________________
Case No: 0003

Jon Doe
Authorize Representative I


Authorize Representative II


Authorize Representative III
 

Users who are viewing this thread

Back
Top Bottom