Author Topic: ReportView controls are awesome  (Read 126 times)

kdmoyers

  • Sr. Member
  • ****
  • Posts: 291
ReportView controls are awesome
« on: November 12, 2019, 03:52:21 pm »
As I finish my fourth major project using a dialog
ReportView control, I have a few observations:

1. ReportView controls are awesome.  They make
my typical SQL-report-to-humans interface stupid
simple to implement.

2. I wish foreground and background colors of
individual rows and cells were controllable.

I mean, it would really be great to draw the users
attention important rows (this order is past due)
or cells (this price is too low).

3. Regardless, ReportView controls are awesome.
I will continue to use them happily.

$0.02
-Kirby

The mind is everything; What you think, you become.

JTaylor

  • Pundit
  • *****
  • Posts: 1046
    • Data & Stuff Inc.
Re: ReportView controls are awesome
« Reply #1 on: November 12, 2019, 07:29:21 pm »
I have tried to implement colors in my Extender for ReportView Controls but so far a no-go.   Appears it must be a CustomDraw thing and I also think it has to respond to Notifications, which I can't see how to do in an Extender.   I have made it possible to set images in the cells so that might accomplish some of what you want.  My demo puts little colored buttons at the beginning of the text in a cell.

Jim

kdmoyers

  • Sr. Member
  • ****
  • Posts: 291
Re: ReportView controls are awesome
« Reply #2 on: November 13, 2019, 05:17:08 am »
<< I have made it possible to set images in the cells >>
Yes! I use it! fiddly to get imagemap set up, but it works great.
The mind is everything; What you think, you become.

JTaylor

  • Pundit
  • *****
  • Posts: 1046
    • Data & Stuff Inc.
Re: ReportView controls are awesome
« Reply #3 on: November 13, 2019, 08:22:56 am »
Does the hassle with the ImageMap appear to be something that can be solved by me making some changes or just a hassle getting the image created as needed?

Jim

kdmoyers

  • Sr. Member
  • ****
  • Posts: 291
Re: ReportView controls are awesome
« Reply #4 on: November 13, 2019, 09:16:24 am »
It's just that making the image map is a sorta non-typical thing to do: it's an array of images together in ONE image, stacked next to another with pixel perfect alignment.  Must be saved as a windows (not os/2) BMP with 24bpp color.  Just a bit fiddly.

Anyway, the color thing is not a big big deal.  Mostly, I just wanted to say what a great thing the reportview is.

-k
The mind is everything; What you think, you become.

JTaylor

  • Pundit
  • *****
  • Posts: 1046
    • Data & Stuff Inc.
Re: ReportView controls are awesome
« Reply #5 on: November 13, 2019, 05:29:56 pm »
Okay.  Just wanted to make sure there wasn't something I could do to make it better.

I agree.  That control was a wonderful addition.

Also wish I could get the coloring to work.  I have spent many hours on it but to no avail.    If Tony has any suggestions or, even better, some code, I am open to working on it some more :-)

Jim

td

  • Tech Support
  • *****
  • Posts: 3103
    • WinBatch
Re: ReportView controls are awesome
« Reply #6 on: November 18, 2019, 08:55:12 am »
The only method I am aware of involves subclassing the control and taking part of the control's drawing process away from the OS and performing it in your own code.  It is something that is on the dialog function's enhancement list.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1046
    • Data & Stuff Inc.
Re: ReportView controls are awesome
« Reply #7 on: November 18, 2019, 09:44:52 am »
Okay.   Will leave it alone then if you are working on it.   I have spent quite a few hours and gotten nowhere.   Hopefully you will add the other things I have in my extender as well.   I know they are easy to add because I did it  ;)

Jim

td

  • Tech Support
  • *****
  • Posts: 3103
    • WinBatch
Re: ReportView controls are awesome
« Reply #8 on: November 18, 2019, 02:33:35 pm »
Not of any real importance but in the interest of complete acruacy there are two other methods to accomplish the above.  One is to implement a custom draw handler and the other is to superclass the control. However, the control does not have an owerndrawn style.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1046
    • Data & Stuff Inc.
Re: ReportView controls are awesome
« Reply #9 on: November 18, 2019, 09:03:45 pm »
Yeah...I have been trying the Custom Draw option.

Jim

td

  • Tech Support
  • *****
  • Posts: 3103
    • WinBatch
Re: ReportView controls are awesome
« Reply #10 on: November 19, 2019, 08:31:02 am »
Custom Draw implementations can be tricky to implement but often require less work than subclassing.  The Dialog function uses subclassing for most of its controls because subclassing allows for more fexibility.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade