TQRChart axis scaling problems
Posted: Tue Nov 05, 2013 1:15 pm
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