Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

DataReport problem

I make use of the DataReport from VB6. The datasource is a ADODB recordset.
The DataReport has 31 RptTextBoxes on one line.
The recorset has a variable nummer of records.
Now the question, how can I accomplish that some cells are getting a different color, according to the value thats in it.
I'll attempt to set the DataReport.RptTextBoxes.ForeColor at the moment I fill the recordset, but this doesn't work because the next record (next line on the report) will have the same color even the value isn't one that requeirs changing colors.
This is what I do:
Aaaa.Fields("Prestatie" & i) = adoPrinten.Fields(4) 'setup the recordset
If Aaaa.Fields("Uren")) <> "DA" Then
DataReport2.Sections("section1").Controls("prest" & i).ForeColor = vbRed '
Endif
Is there no other way to read each "cell" from the report after it is completed and change the color of that "cell"
Please some advice
Cheyenne

Comments

  • Termc1224Termc1224 Member Posts: 84
    : I make use of the DataReport from VB6. The datasource is a ADODB recordset.
    : The DataReport has 31 RptTextBoxes on one line.
    : The recorset has a variable nummer of records.
    : Now the question, how can I accomplish that some cells are getting a different color, according to the value thats in it.
    : I'll attempt to set the DataReport.RptTextBoxes.ForeColor at the moment I fill the recordset, but this doesn't work because the next record (next line on the report) will have the same color even the value isn't one that requeirs changing colors.
    : This is what I do:
    : Aaaa.Fields("Prestatie" & i) = adoPrinten.Fields(4) 'setup the recordset
    : If Aaaa.Fields("Uren")) <> "DA" Then
    : DataReport2.Sections("section1").Controls("prest" & i).ForeColor = vbRed '
    : Endif
    : Is there no other way to read each "cell" from the report after it is completed and change the color of that "cell"
    : Please some advice
    : Cheyenne
    :
    I use datareport before but i cannot manipulate the other controls in it. so i tried using crystal report. so try using crystal report cause you can change text, create a function, change their color.
    Don't quit, you'll get it. :-)

Sign In or Register to comment.