Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coloured rows in report
Message
 
To
04/01/2007 13:35:31
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italy
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01182383
Message ID:
01182611
Views:
12
>I've a grid in which the user can select a color (GetColor()) and the row is then colored with that color (using DynamicBackColor). The color is also stored in a field of the cursor underlying the grid.
>I've the need to print a report (Set ReportBehavior 80) with the colors as displayed in the grid.
>
>How can I obtain the result?
>
>TIA

You actually can, but it needs a slight hack at the .frx report file...
Create the report with a rectangle for the background you want, size it where you need, etc. Double click the control and put something unique in the "COMMENT" property of the control to refer back to. Something like "CHANGE THIS BACK COLOR". Make sure the sample rectangle shape has showing SOMETHING as a backcolor even if its defaulted to a light grey so you know the shading is properly set and not in a transparent vs opaque vs no fill mode...

Then, in the process before actually building the report, build a new temp copy of the report something like
   select * from (yourReport.frx) into table c:\Temp\MyTestReportCopy.frx
   use in select( "YourReport" )  && alias of orig report.frx from SQL
   use c:\Temp\MyTestReportCopy.frx
   
   */ Then, update respective columns for FILLGREEN, FILLBLUE, FILLRED
   */ with the value as from the grid control for the entry in question
   replace FillRed with (redcolor.fromgrid),;
           FillGreen with (greencolor.fromgrid),;
           FillBlue with (bluecolor.fromgrid);
       for atc( "CHANGE THIS BACK COLOR", Comment ) > 0

    use

    */ Then, report THIS TEMP REPORT VERSION
    report form c:\Temp\MyTestReportCopy.frx preview / or to print / etc...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform