Link to home
Start Free TrialLog in
Avatar of Nelmarcas
Nelmarcas

asked on

Emulating Green Bar Paper

Hi,
I have been working on several projects that require sending a reports print file to an AS400 Line Printer,(real Old and what a nightmare).  The reason for this is my boss wants to see the reports on Green Bar Paper for the sole purpose that it is easier to read when there are many line items.  Anyway, Does anyone know how I can make the background of the detail portion of the report to switch background color on every even number and back to white on every odd?  This would achieve printing a report on a laser printer emulating the green bar paper supposedly easy to read feature.  Thank you.

Avatar of berg1375
berg1375

This probably doesn't help, but I had to use the thin lines under each detail, because my boss wanted the same effect. I don't know if there is a way to format the report that way, but I am curious to find out.

If all else fails lines  :)

berg
ASKER CERTIFIED SOLUTION
Avatar of threeps99
threeps99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Of course you can use what colours you want, I dont know off the top of my head what green is, though you could probably even use vbGreen.

threeps
OF course, threeps would know.  :)

berg
Avatar of Nelmarcas

ASKER

This sounds great, let me give it a try and see what I come up with. I can handle the colors, I will keep you posted.
Make sure you thoroughly test this.  I seem to recall that the Format event is sometimes unpredictable and will be fired more than once on the same detail... of course I could be wrong.
dtomyn,

The format even can be "unpredictable" as you call it only when doing complex calculations, as in sometimes the "retreat" event is needed and Access must return to previous sections on a report to perform multiple formatting passes. When this happens the Format event is called again. I don tthink Nelmarcas has this on his report but even if has the desired effect of having different colour lists will still be achieved.

threeps
Nelmarcas,

Had any luck?

threeps
Threeps-

Just used the code on a report. It works great.

berg
I will let you know by Wednesday for sure. Preliminary test works fine.  I do have a complex report that contains many sub reports built in to it. however they are not in the detail section, which is were I want to emulate this "Green Bar Thingie".
It worked great, make sure you declare the intCounter as a public variable.
easy, fast and not buggy, say good bye to the line printer..
Danke Schon!!!

This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
https://www.experts-exchange.com/jsp/zonesAll.jsp

For experts interesting in helping the cleanup effort in their respective TAs, this link please:
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you,
Moondancer
Moderator @ Experts Exchange
I have found this to be a very simple way to emulate "greenbar"

Go to the OnFormat Property of which ever band you want to emulate greenbar.  In this case I wanted the greenbar effect in the Detail band.  Enter the Dimension statement and then cut and paste the lines between the Private Sub and End Sub Statements.  You can choose what ever colors  you wish by changing the variables on the Detail.backcolor statement.


Option Compare Database

Dim greenbar As Boolean

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If greenbar Then
   Detail.BackColor = 13619102
Else
   Detail.BackColor = vbWhite
End If
greenbar = Not (greenbar)
End Sub
Access 2007 has an "Alternate Back Color" format property.  Coding, at least just for "greenbar", isn't needed.