[SOLVED] Landscape not working (CreatePrintView) |
Post Reply |
Author | |
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
Posted: 30 September 2010 at 6:30am |
Hi, This doesn't work in the last release : Me.ReportControl1.PrintOptions.Landscape = True Me.PrintPreview1.PrintView = ReportControl1.CreatePrintView() Seems that "CreatePrintView" always create report in portrait mode !!! See this sample and please make a fast update, my customers and my boss are really angry... Regards, |
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Hi,
It's late in the day so I am not in the office to check this out, but can I ask why you are using the PrintPreview control to print the data from the ReportControl? The reason I ask is that the ReportControl has the ability to open an inbuilt Print Preview, which works in both Landscape or Portrait! But I do think there is a way of changing the PrintPreview control to print in both too. I will check this tomorrow when I get into the office. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Hi,
Well I have tried your code on v13.4.0 and all seems to work fine, what version are you using? I created a small example to test this and it both displays and prints in Landscape (see screenshot attached), is have also attached the test version I created uploads/2960/PrintPreview.rar. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Hi, The last version ! 13.4.1. (http://www.codejock.com/corporate/whatsnew.asp#09202010). As I said, it works fine with 13.4.0. I use PrintPreview with ReportControl because : 1) The look of print preview is better (command bars VS buttons) 2) It's easy to change the captions of the buttons in printpreview (you just have to get the CommandBar object and use it) 3) I need to customize the available's actions when the printpreview is shown. For Example, on my print preview form I've added a checkbox in the commandbar to switch between "portrait" and "Landscape" mode. Anyway, thank you for your replies, if CJ could do the same... |
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Hi,
I understand why you prefer to use the PrintPreview control as I use this for the same reasons. Well it looks like a possible bug in the latest version unless there's a way to resolve it, however you should report the Bug at http://www.codejock.com/support/ When reporting it I would link them to this thread. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
I've done it yesterday. Issue : #25375 No answer for the moment. Thanks for your help.
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
For the moment I have not heard of the support on this ...
I will return to 13.4.0 and I'll live with the other bugs, a little less serious ... To 14.0, consider making the tests a bit more advanced or, if you do not have time, thank you to provide your users a beta version. This kind of bug is very destabilizing.The quality of your components and our software depends on it. |
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
To allow everything to print with landscape mode, PrintPreview control now just have own Orientation mode. Please use it instead: Me.PrintPreview1.Orientation = xtpOrientationLandscape
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Thank you Oleg. Seems that it works. Don't you think that such kind of change should be highlighted in change log !? When an update need your customers to change their code it's the least to do !
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
ok, Great.
There is note about Orientation in release notes. maybe only not obvious what to do with it :) PrintPreview.Orientation property added
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
What is sad is that it does not indicate that the property is used in place of the one of the report control when you use them together !
Maybe the printpreview could use the report control property on initialize ? But this is not important, now it works. Thanks for your help.
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I need to add some functionality too... Adding buttons isn't the problem but how to catch click event for the newly added button? I tried a lot but didn't succeed. Can I ask you how you did this?
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Hi Aaron,
In fact I think it's impossible if you use the print preview toolbar because you don't have access to the "execute" method of the toolbar. So you can add controls but there's no way to catch the click event. In my case, I customize the labels of the printpreview commandbar controls and I've added a second command bar in the bottom of the printpreview wich is used as usual. The printpreview control is very helpfull because you can place it on a form and add others controls. The printpreview function of the report control is easy to use but you can't customize the controls shown on the form. Hope this help.
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, Thanks for reply. Too bad, there's no event you can catch. For now I removed 'close' button and added seperator and checkbox (only to toggle 'preview' Landscape and Portrait) with same ID as 'close' button and I'm able to use Close event to add necessary code.Well, at least you are able to access the toolbar and set new captions and tooltips. Would be nice though if we could add some more... CJ???
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Hi Aaron,
As there is no direct way of catching the event you could add Custom Controls i.e. Combo, CheckBox etc. I have done this with a ComboBox and it works fine, this way you can add many controls to the toolbar and leave the Close event to close the PrintPreview.
See below example for adding a ComboBox for printer orientation:
|
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, Thanks for reply. That could be an option too but I decided to add extra commandbars to PictureBox (with PrintPreview inside as well and using Dockingpanes). I added toolbar the toolbar and changed some properties for PrintPreview Toolbar. Just in case CJ implements the Execute/Update event, the only thing I have to do is copy/paste some code to get this fully functional. If you don't use Dockingpanes this is an OK solution without having to position/size the solution I decided to use.
btw. This post shows what a forum is about, different members with different solutions. We should do this more often
This is what I did: (note: PrintPreview & CommandbarsExtra inside PictureBox & DockingPanes)
Private Function CreatePrintPreviewToolbar()
'Set same properties for both toolbars because I had to position new toolbar to top-left 'and right beneath new toolbar, the PrintPreview toolbar resides because it is positioned
'through ResizeClient event.
With Me.PrintPreview .VisualTheme = xtpThemeNativeWinXP With .Toolbar
.ShowGripper = False .ContextMenuPresent = False .Customizable = False .CustomizeDialogPresent = False .ShowExpandButton = False .EnableDocking xtpFlagStretched
End With End With With Me.CommandBarsPrintPreviewExtra .DeleteAll .VisualTheme = xtpThemeNativeWinXP With .Add("Test", xtpBarTop) With .Controls .Add xtpControlCheckBox, 1000, "Landscape"
'.Add ........
End With .ShowGripper = False
.ContextMenuPresent = False .Customizable = False .CustomizeDialogPresent = False .ShowExpandButton = False .EnableDocking xtpFlagStretched
End With End With End Function Private Sub CommandBarsPrintPreviewExtra_ResizeClient(ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long)
Me.PrintPreview.Move Left, Top, Right - Left, Bottom - Top End Sub Output:
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |