TQRChart axis scaling problems
TQRChart axis scaling problems
Software:
IDE : Codegear RAD Studio 2007 for C++
Steema TeeCharts 8.05.50522
QBS Software QuickReport 4.07
Hello,
I´m facing a weird problem with the TQRChart component. I´ve got an MDI application that is used to generate printouts. The application can be remotely controlled by external commands, and one of these commands tells it to generate a MDI child form containing a chart and then print that chart using QuickReport and the TQRChart component. After printing the chart it closes the MDI child form containing the chart. This is how it works:
1) The application is already started and either visible or minimized
2) The application receives an external command via WM_COPYDATA caught by the MDI Parent Window
3) create a MDI child form containing a TChart diagram
4) create a TQuickRep form containing a TQRChart to render the TChart diagram from 2)
5) use the TQuickRep from to print the chart
6) close the TQuickRep form
7) close the MDI child form
This works very well most of the time, but sometimes the vertical axis labels are messed up (see attachment broken.jpg). After some investigation I figured the printout depends on the state of the MDI child window. When the application (and the MDI child frame) is visible the printout looks like the attachment normal.jpg. When the application is minimized to the taskbar the printout looks like the attachment hidden.jpg. In rare cases the printout looks like attachment broken.jpg, but that happened only if the main application was minimized.
I don´t understand how a TQRChart component renders the chart, I was under the impression the TQRChart´s size depends solely on the TQRChart´s size on the TQuickRep. Since we use a fixed page and paper size the printout should always look the same. How come the printout looks different, depending on the state of the corresponding MDI child window. Why do the printouts normal.jpg and hidden.jpg look different? Is this intended, and, if not, how can I fix it?
Kind regards,
Guido
IDE : Codegear RAD Studio 2007 for C++
Steema TeeCharts 8.05.50522
QBS Software QuickReport 4.07
Hello,
I´m facing a weird problem with the TQRChart component. I´ve got an MDI application that is used to generate printouts. The application can be remotely controlled by external commands, and one of these commands tells it to generate a MDI child form containing a chart and then print that chart using QuickReport and the TQRChart component. After printing the chart it closes the MDI child form containing the chart. This is how it works:
1) The application is already started and either visible or minimized
2) The application receives an external command via WM_COPYDATA caught by the MDI Parent Window
3) create a MDI child form containing a TChart diagram
4) create a TQuickRep form containing a TQRChart to render the TChart diagram from 2)
5) use the TQuickRep from to print the chart
6) close the TQuickRep form
7) close the MDI child form
This works very well most of the time, but sometimes the vertical axis labels are messed up (see attachment broken.jpg). After some investigation I figured the printout depends on the state of the MDI child window. When the application (and the MDI child frame) is visible the printout looks like the attachment normal.jpg. When the application is minimized to the taskbar the printout looks like the attachment hidden.jpg. In rare cases the printout looks like attachment broken.jpg, but that happened only if the main application was minimized.
I don´t understand how a TQRChart component renders the chart, I was under the impression the TQRChart´s size depends solely on the TQRChart´s size on the TQuickRep. Since we use a fixed page and paper size the printout should always look the same. How come the printout looks different, depending on the state of the corresponding MDI child window. Why do the printouts normal.jpg and hidden.jpg look different? Is this intended, and, if not, how can I fix it?
Kind regards,
Guido
- Attachments
-
- Messed up printout
- Broken.jpg (101.83 KiB) Viewed 15315 times
-
- Printout generated when visible
- Normal.jpg (116.01 KiB) Viewed 15256 times
-
- Printout generated when minimized
- Hidden.jpg (84.87 KiB) Viewed 15223 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Hello,
Can you reproduce it in an application with a TChart component in a form instead of a TQRChart? Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Can you reproduce it in an application with a TChart component in a form instead of a TQRChart? Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TQRChart axis scaling problems
Hello,
I´ve uploaded a zip file containing an executable and the C++ sources. Selecting "Start background export" and "Stop background export" start and stop the background image export respectively. You will notice different results depending on the state of the main window.
I´ve uploaded a zip file containing an executable and the C++ sources. Selecting "Start background export" and "Stop background export" start and stop the background image export respectively. You will notice different results depending on the state of the main window.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Hello,
Thanks in advance.
Where did you upload the files? Did you forget to include it in your reply?OCS wrote:I´ve uploaded a zip file containing an executable and the C++ sources.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TQRChart axis scaling problems
I´m sorry, I missed the error message:
"The file is too big, maximum allowed size is 512 KiB."
I stripped the .exe from the archive, so you have to build the .exe your own. Is there another way to upload the archive ( ~1MiB)?
Regards,
Guido
"The file is too big, maximum allowed size is 512 KiB."
I stripped the .exe from the archive, so you have to build the .exe your own. Is there another way to upload the archive ( ~1MiB)?
Regards,
Guido
- Attachments
-
- TeeQRTest.zip
- (9 KiB) Downloaded 422 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
BTW, I see the project file is missing. Could you please a attach a complete project with its sources?OCS wrote:I´m sorry, I missed the error message:
I stripped the .exe from the archive, so you have to build the .exe your own. Is there another way to upload the archive ( ~1MiB)?
Also, did you test that? How did it go?Narcís wrote:Can you reproduce it in an application with a TChart component in a form instead of a TQRChart?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TQRChart axis scaling problems
No, I was unable to reproduce the effect without a TQRChart. I saved bitmaps of a TChart and they were all fine.Can you reproduce it in an application with a TChart component in a form instead of a TQRChart?
Do you still need the project files even if they use the TQRChart?
Regards,
Guido
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Hi Guido,
Thanks for your feedback. Yes please, it would have been easier to work without the TQRChart component but we will have to look at it this way.
Thanks for your feedback. Yes please, it would have been easier to work without the TQRChart component but we will have to look at it this way.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TQRChart axis scaling problems
I´ve uploaded the File "TeeQRTest.zip" into your upload area.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Hi OCS,
I can't find the file. Did you use your forums profile email address for posting it?
I can't find the file. Did you use your forums profile email address for posting it?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TQRChart axis scaling problems
Yes, I used my profile´s user name and email address.
I just uploaded the file again, just to make sure.
I just uploaded the file again, just to make sure.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Hi OCS,
Thanks for your feedback but I'm still unable to find the file here. Did you get a message like this: "Received TChart.jpg Content Type image/jpeg Length 46620"? Otherwise, could you please send it to info at steema dot com with a reference to this thread?
Thanks again and apologies for the inconvenience.
Thanks for your feedback but I'm still unable to find the file here. Did you get a message like this: "Received TChart.jpg Content Type image/jpeg Length 46620"? Otherwise, could you please send it to info at steema dot com with a reference to this thread?
Thanks again and apologies for the inconvenience.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Hi Guido,
We have finally received your files. We will investigate the issue here and will get back to you when we have some news.
We have finally received your files. We will investigate the issue here and will get back to you when we have some news.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TQRChart axis scaling problems
Hi Guido,
This is really weird and definitely not intended. An easy alternative might be using a TChart component, export it to an image (MetaFile if necessary) and use it in the QuickReport. Using StretchDraw as in the example here might be suitable for your requirements.OCS wrote: Is this intended, and, if not, how can I fix it?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |