Help - Search - Members - Calendar
Full Version: Cross tab, how to highlight cell value by value from DB
Fast Reports forum > Fast Reports Products > FastReport 4.0
zgortan
Hello,

Is possible in to highlight cell value by different value from DB?
For example: DB has following values:
1, A, 100, 1
1, B, 120, 1
1, C, 110, 2
2, A, 90, 1
2, B, 150, 2
2, C, 120, 1

in frxDBCrossView I have:
CODE
A B C
1 100 120 110
2 90 150 120


... so is possible to highligh cell("1","C") and ("2","B") e.g. to Red (because 4th field in DB is 2 (not 1))? ... or how in OnPrintCell event read field from database 4th column field?
Thanks in advance!
gpi
Try to write user function to select 4th field from table
zgortan
QUOTE(gpi @ Sep 1 2011, 01:29 PM) *
Try to write user function to select 4th field from table


Thanks for reply ... but I still don't know how in FR to loop each field from dataset ... DBSet.FindFirst, .FindNext... doesn't work.
Is possible to get one example?

Regards...
gpi
See a Developer's manual "Custom Functions Connection to Report"
You can select 4th field from DB in user function. Use first, second and third fields as parameters of user function
Call user function in cross OnPrintCell event
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.