display textbox text in report
I have created an application with vb2010 to manage contacts, a form which uses textboxes, checkboxes to edit or add contacts.
It also has a button to print a certain member currently display in the form.
What I would to know is, how can I display the text of several textboxes and checkbox on a report.
I have the following code:
This is not working, can someone help me with this?
Thanks
It also has a button to print a certain member currently display in the form.
What I would to know is, how can I display the text of several textboxes and checkbox on a report.
I have the following code:
Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
        'PrintPage.ShowDialog()
        Dim name As Object
        Using report As New FastReport.Report()
            report.Load("Separate Member.frx")
            'report.RegisterData(dataSet1, "NorthWind")
            name.text = NameTextBox.Text
            report.Show()
        End Using
    End Sub
This is not working, can someone help me with this?
Thanks
Comments
You may use dialogue forms in a report:
http://www.fast-report.com/documentation/U...alogueforms.htm
If you want to print values from your app dialogue form, you may pass value using the report parameters:
report.SetParameterValue("textBox1Text", textBox1.Text);
and print this value in a report using the Text object:
[textBox1Text]
I have tried to use you example:
And this is what I have created in the design report:
But when I run the application and click the button, the report is completely empty.
I don't get why?
Thanks
The only thing I still saw, was that the dialog field contained the text as when I placed it when designed, while it should display the text of the textbox from my windows form.
How to do this?
Thanks for your reply, I stopped using the dialogue (because it wasn't needed) and still it works, by using the setparametervalue.
Thanks again for your help.