Directly Changable Report
I've a form and a Report. The report takes the datas in my db.mdb file. I have'nt got any problem of this situation. but I have to do another thing in my program. The topic of my report must be changeable. User can type a text in a textbox of my form and this text user typed must be written in my report as a topic. how can I do that ? Please help me somebody, and I'm so sorry for my English
dont cry , dont cry . Please, please , please
.Your english is fine
Taake a parameter in Crystal Reports and set its value in Form.
ReportObject.SetParameterValue("ParameterName",Value);
use this formual, this will set your topic at runtime.Take the value from textbox on your form where user enters the topic.
In fact I managed your comment. but my program wants to enter the text from user when the report loading Actually I dont like that. I want that the user can enter his/her own text in a textbox in my form. and when he/she click a button, my report can appear, and doesn't ask another question. If you know how can I do that, please please please help me
thanks your answer. I did that you have told. But my .net2005 shows an error when the program running. my parameter textbox's name is : mytopictxt and my codes like that ;
Dim myreport As New MyCrystalReport1 myreport.SetParameterValue(
"mytopic", topictxt) CrystalReportViewer1.ReportSource = myreport
topictxt is a variable that defined in a module as a public. As I told you, I have another form in my program. This form has a textbox that name is mytopicbox.
when a button clicks, my another form that includes a CrystalReportWiever appears.
What should I do? where should myreport.SetPa....bla bla code be written? in my form that includes textbox, or another form includes CrystalReportWiever1 ?
It should be written on form where you are creating object of your report
this code seems to be OK
Dim myreport As New MyCrystalReport1
myreport.SetParameterValue("mytopic",topictxt)
CrystalReportViewer1.ReportSource = myreport
"mytopic" - This should be parameter in your report ok.
pass value of textbox on first form to this variable "topictxt"
when you call your report , also pass value of TextBox from first form to second form so that value gets assigned to variable "topictxt"