hi,
How to pass value to crystal report text object?
ex. form1.label1.text pass to crystal text object.
popskie
Printable View
hi,
How to pass value to crystal report text object?
ex. form1.label1.text pass to crystal text object.
popskie
not totally familiar with crystal reports, mostly this is what i did. In the crystal report i used the parameter fields in order to hold values coming from my form, so this would be.
hope that helps. :bigyello:Code:ParameterDiscreteValue pd = new ParameterDiscreteValue();
ParameterValues pv = new ParameterValues();
private void button1_Click_1(object sender, System.EventArgs e)
{
CrystalReport1 cr = new CrystalReport1();
pd.Value = this.textBox1.Text;
pv.Add(pd);
cr.DataDefinition.ParameterFields["name"].ApplyCurrentValues(pv); // "name" is the parameter set in my crystal report
crystalReportViewer1.ReportSource = cr; // report viewer
}
My crystal report has no table involve. Just only a textbox but what I want during runtime my form pass the value to report textbox.
then you should put a parameter fields in you crystal report and that code above. :bigyello:
here....
ok fret, how to show the field explorer .
it is already there in your crystal report design.
It is invisible in my c# app. but in crystal report designer its ok.
popskie
what do you mean by that? i don't quitely get it? could you explain it more, because i actually what i did, in my c# app i add a new item>>crystal report, just that, you'll only see the field explorer in the crytal report itself. :)Quote:
Originally Posted by popskie
pls take alook the attach doc file.
popskie
i see....ehehe there's no "field explorer" :bigyello: try press Ctrl+Alt+T.
ok thanks a lot .