Printing Certain Tab of Tabpanel without Dialog/Preview

I have a complicated formindialog that I need to print. The formindialog contains two tabpanels that need to remain selected as they are when the user hits print. Printing it closes the formindialog if I use any preview at all, and any dialog box seems to clear the area of the window where the dialog was and never redraw it. That’s not OK – plus I need to have it print a print-formatted dup of the form itself. So I’m using the below code to switch forms and print without preview or dialog, merely informing the user that it worked by changing the button text:

elements.ButtonPrint.text = "Printing..."
//forms.CalculatorPRINTABLE.controller.showPrintPreview(true)
application.updateUI()
var tab = elements.Milestones.tabIndex
forms.CalculatorPRINTABLE.elements.Milestones.tabIndex = tab
application.updateUI()
forms.CalculatorPRINTABLE.controller.print(true,false,false)
elements.ButtonPrint.text = "Print"

But it’s not selecting the right tabpanel to print. It always goes to 1, though the variable above is being correctly set to 3 according to debugger. These are the correct element names, no typos or obvious errors. Help? i assume it’s because the form is not being shown? But I can’t for the above reasons…

This apparently has zero to do with most of the detail i supplied above – apparently you can’t print a secondary tabpanel in Servoy without going to that form itself. This doesn’t work for me, so I’m currently working on a way to remove the tabs that I don’t want to print so that it has only one tab to choose from, and will therefore print it. However, as far as I can tell all I can do is add back relationsless tab panels – which most of mine are, but not all, so I’m a bit stumped there. Any ideas?

Did you ever crack this one? I want to hide certain tabpanels in a footer before printing, can’t get it to work. The code looks good, but the panels still show in preview.

It seems that I have this problem too…has it been solved? Or are we doing sumthing wrong.

I have a form(recordview) with a tabpanel with 2 tabs(also recordviews). Depending on certain values I need tab1 or tab2 printed.

if(mv_id==3){
	elements.tabs_70.tabIndex = 1;
} else {
	elements.tabs_70.tabIndex = 2;
}

But it always prints tab1 no matter what.

Servoy Developer
Version R2 2.2.7-build 339
Java version 1.5.0_11-b03 (Windows 2003)

I have the same problem. I want to print the active tab within a tab panel. When I print it only prints the first tab. Is there a fix for this or what.

Hello

Is there a fix for this?
I use 5.2.7.

Thank you
Bye
Roberto

Sorry. Work

Bye
Roberto