Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coloured rows in report
Message
 
À
04/01/2007 13:35:31
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01182383
Message ID:
01182611
Vues:
13
>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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform