Gammatech Posted December 10, 2010 Share Posted December 10, 2010 Hi, I have a pop up page that shows the minimum, Maximum, Instantaneous, Average and Standard error of the mean for five variables being read every second. There are buttons for various functions on the page, one of which was intended to send it to the printer. As I don't want the buttons on the print out the actual page that should be printed is a copy that has no buttons as you suggested previously. the [Print] button has the action: // Stop updating the signals page ProcessMeas = 0 // print the copy page Page.PrintPage("SignalsPrint") // restart update of signals page ProcessMeas = 1 Where ProcessMeas is a flag that stops the calculation sequence for the data. SignalsPrint is the copy page, without the buttons, that I want to print. When the Print button on the signals page is pressed the printer responds by printing the Main page and not the desired page, so what is going wrong here? In my initialization I change to the copy page for a short time while a few other tasks are carried out but this seems to make no difference. BeginSeq(MenuStartUp) // Display the SignalsPrint page for a short while Page.StrCurrentPage = "SignalsPrint" // Populate the text messages combo box Component.MsgSelComboBox.ClearChoices() For(Private Index = 0, Index < NumRows(TextOutMsg), Index ++) Component.MsgSelectComboBox.AddChoices(TextOutMsg[Index], TextOutMsgVal[Index]) EndFor // Hide the digital's display Component.DigitalDisplay.Visible = 0 // change back to main page as the SignalsPrint page should be registered by now Page.StrCurrentPage = MainPage // start the main loop BeginSeq(GetValues) Where MainPage is a variable that contains the actual main page for the application (I use the code for two different instruments.) TextOutMsg and TextOutMsgVal are two declared array variables (the first is a string variable) that hold about 10 elements each. Is this not long enough to display the print page? Thanks, Martin Link to comment Share on other sites More sharing options...
Gammatech Posted December 10, 2010 Author Share Posted December 10, 2010 I've solved this by changing the button action to PrintPage and naming the page as I was in the Quick sequence. Thus dropping the attempt to stop the update, but this seems not to matter. Is there any need for the code to switch to the print page for a short time as I haven't as yet removed this? Does this imply there is a bug with the sequence code Page.PrintPage("pagename") as this didn't work while the new version does. Martin Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.