Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10136 > unrolled thread

VO with ReportPro 2.12 printing a coloured block.

Started bysimon@abersoftware.co.uk
First post2017-02-06 08:25 -0800
Last post2017-02-07 09:46 +0000
Articles 6 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  VO with ReportPro 2.12 printing a coloured block. simon@abersoftware.co.uk - 2017-02-06 08:25 -0800
    Re: VO with ReportPro 2.12 printing a coloured block. Franz Rachbauer <office@rachbauer.org> - 2017-02-06 18:07 +0100
    Re: VO with ReportPro 2.12 printing a coloured block. simon@abersoftware.co.uk - 2017-02-06 09:48 -0800
    Re: VO with ReportPro 2.12 printing a coloured block. Robert van der Hulst <rjvanderhulst@gmail.com> - 2017-02-06 15:09 -0800
      Re: VO with ReportPro 2.12 printing a coloured block. simon@abersoftware.co.uk - 2017-02-08 01:32 -0800
    Re: VO with ReportPro 2.12 printing a coloured block. Martin <Martin@spam.spam> - 2017-02-07 09:46 +0000

#10136 — VO with ReportPro 2.12 printing a coloured block.

Fromsimon@abersoftware.co.uk
Date2017-02-06 08:25 -0800
SubjectVO with ReportPro 2.12 printing a coloured block.
Message-ID<237104c3-d6f8-488d-a22e-41caddce7c74@googlegroups.com>
Hi All,

Been a long time since posting here!

Anyone still using reportpro to print reports?

I want to print a block of colour onto a report based on a RGB value from the database. (Each item on the report can be painted in a different colour so I wanted to print this colour alongside each item if I can.)

Anyone have any ideas?

TIA

Simon

My only idea at the moment would be to generate BMPs of each colour and print that onto the report. Not sure if I can create a UDF for report pro that would generate this BMP on the fly.

[toc] | [next] | [standalone]


#10137

FromFranz Rachbauer <office@rachbauer.org>
Date2017-02-06 18:07 +0100
Message-ID<o7aah0$f0u$1@gioia.aioe.org>
In reply to#10136
With RpPrinter (handcoded) you can do this with:
oRpPrinter:DrawRectangle([nFromY], [nFromX], [nToY], [nToX], 
[nLineThickness], [nLineStyle], [oLineColor], [nBkGndStyle], [nBkGndColor]).

With RpReport (designer) maybe:
design the needed coloured rectangles and give them a PrintWhen clause 
depending on a var.

Regards, Franz

Am 06.02.2017 um 17:25 schrieb simon@abersoftware.co.uk:
> Hi All,
>
> Been a long time since posting here!
>
> Anyone still using reportpro to print reports?
>
> I want to print a block of colour onto a report based on a RGB value from the database. (Each item on the report can be painted in a different colour so I wanted to print this colour alongside each item if I can.)
>
> Anyone have any ideas?
>
> TIA
>
> Simon
>
> My only idea at the moment would be to generate BMPs of each colour and print that onto the report. Not sure if I can create a UDF for report pro that would generate this BMP on the fly.
>

[toc] | [prev] | [next] | [standalone]


#10138

Fromsimon@abersoftware.co.uk
Date2017-02-06 09:48 -0800
Message-ID<e6dfa45e-e41f-457a-920f-c43027cd30b0@googlegroups.com>
In reply to#10136
On Monday, February 6, 2017 at 4:25:45 PM UTC, si...@abersoftware.co.uk wrote:
> Hi All,
> 
> Been a long time since posting here!
> 
> Anyone still using reportpro to print reports?
> 
> I want to print a block of colour onto a report based on a RGB value from the database. (Each item on the report can be painted in a different colour so I wanted to print this colour alongside each item if I can.)
> 
> Anyone have any ideas?
> 
> TIA
> 
> Simon
> 
> My only idea at the moment would be to generate BMPs of each colour and print that onto the report. Not sure if I can create a UDF for report pro that would generate this BMP on the fly.

Thanks Franz

Trouble is there may be a few hundred colours and I dont know what they'll be - customer can set these up :(.

May have to handcode the report as that looks like it'll solve the problem. (Never tried handcoding before so this should be interesting!)

[toc] | [prev] | [next] | [standalone]


#10139

FromRobert van der Hulst <rjvanderhulst@gmail.com>
Date2017-02-06 15:09 -0800
Message-ID<44d6c3f9-5749-438c-84ad-b56bfcde093e@googlegroups.com>
In reply to#10136
Simon,

What about the following solution:
- insert an image in your report with the expression GetImg(R,G,B) where R,G,B are the RGB values from the color. GetImg must be a UDF in a reportpro Function Lib
- In the GetIMG function you create a very small BMP file or other image file om disk (5 x 5 pixels for example) which you fill with the color specified in the R,G.B values
- return the name of the file from the GetIMG function
- put the image file in a temp folder that you can delete after the report has finished printing


Robert

> Hi All,
> 
> Been a long time since posting here!
> 
> Anyone still using reportpro to print reports?
> 
> I want to print a block of colour onto a report based on a RGB value from the database. (Each item on the report can be painted in a different colour so I wanted to print this colour alongside each item if I can.)
> 
> Anyone have any ideas?
> 
> TIA
> 
> Simon
> 
> My only idea at the moment would be to generate BMPs of each colour and print that onto the report. Not sure if I can create a UDF for report pro that would generate this BMP on the fly.

Simon

[toc] | [prev] | [next] | [standalone]


#10143

Fromsimon@abersoftware.co.uk
Date2017-02-08 01:32 -0800
Message-ID<3f952352-ae19-43ee-890e-301126cf0f0d@googlegroups.com>
In reply to#10139
On Monday, February 6, 2017 at 11:09:13 PM UTC, Robert van der Hulst wrote:
> Simon,
> 
> What about the following solution:
> - insert an image in your report with the expression GetImg(R,G,B) where R,G,B are the RGB values from the color. GetImg must be a UDF in a reportpro Function Lib
> - In the GetIMG function you create a very small BMP file or other image file om disk (5 x 5 pixels for example) which you fill with the color specified in the R,G.B values
> - return the name of the file from the GetIMG function
> - put the image file in a temp folder that you can delete after the report has finished printing
> 
> 
> Robert
> 
> > Hi All,
> > 
> > Been a long time since posting here!
> > 
> > Anyone still using reportpro to print reports?
> > 
> > I want to print a block of colour onto a report based on a RGB value from the database. (Each item on the report can be painted in a different colour so I wanted to print this colour alongside each item if I can.)
> > 
> > Anyone have any ideas?
> > 
> > TIA
> > 
> > Simon
> > 
> > My only idea at the moment would be to generate BMPs of each colour and print that onto the report. Not sure if I can create a UDF for report pro that would generate this BMP on the fly.
> 
> Simon

Hi Robert/ Martin

That sounds like a good idea - I'll give it a go and see what happens.

Thanks.

Simon

[toc] | [prev] | [next] | [standalone]


#10140

FromMartin <Martin@spam.spam>
Date2017-02-07 09:46 +0000
Message-ID<o7c4u3$a03$1@dont-email.me>
In reply to#10136
Do as Robert suggests

We embed bitmaps quite happily.

On 06/02/2017 16:25, simon@abersoftware.co.uk wrote:
> Hi All,
>
> Been a long time since posting here!
>
> Anyone still using reportpro to print reports?
>
> I want to print a block of colour onto a report based on a RGB value from the database. (Each item on the report can be painted in a different colour so I wanted to print this colour alongside each item if I can.)
>
> Anyone have any ideas?
>
> TIA
>
> Simon
>
> My only idea at the moment would be to generate BMPs of each colour and print that onto the report. Not sure if I can create a UDF for report pro that would generate this BMP on the fly.
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web