11-04-2008 07:55 AM
Hi,
I use a script from Diadem to load some data and make a report.. For that I load the data, and the report apeare, with a dialog box (ProtocolDlg2) were I can chose to edit the report variables, or print the report.
My question is how I can load in the editbox from the DialogBox(ProtocolDlg2), the variables ( in my script there are the Datasetcomments from 1 to 11).
I want when I open the Dialogbox - ProtocolDlg2, all the data from the report( TO ;DVM TO; Sample Number; ....) to apear in the editboxes, and to have the possibility to modify and after that to print again the report, and close the application.
The datasetcomments are from a txt file. This application is a part of a VBA application.
Attached you have my script and my file .SUD
Thank you for your time.
Solved! Go to Solution.
11-04-2008 08:17 AM
Hi again,
If it isn't possible with the editbox ( I try with a table too, but no succes), please tell another way that I can load the report and modify the data inside the report so I can print after that.
Thank you again.
11-05-2008 08:50 AM
Hi Marse,
It looks like you're close. By the way, what version of DIAdem are you using? It looks like it's not DIAdem 11.0. In your "ProtocolDlg2" you have a Button1_EventClick event that sets two of the edit boxes:
Sub Button1_EventClick()
Dim This : Set This = Button1
Call SudDlgShow("ReportDlg1", AutoActPath & "Protocol.SUD")
EditBox1.Text = DataSetComment(4)
EditBox2.Text = DataSetComment(9)
End Sub
But this is what you need to do in the "General Declarations" section for EACH of the edit boxes. The Button1_EventClick event should be used to store the changed values back into the DataSetComments() array, like this:
Sub Button1_EventClick()
Dim This : Set This = Button1
Call SudDlgShow("ReportDlg1", AutoActPath & "Protocol.SUD")
DataSetComment(4) = EditBox1.Text
DataSetComment(9) = EditBox2.Text
End Sub
Brad Turpin
DIAdem Product Support Engineer
National Instruments