|
-
Jul 29th, 2005, 07:47 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] passing value to crystal report
hi,
How to pass value to crystal report text object?
ex. form1.label1.text pass to crystal text object.
popskie
-
Jul 29th, 2005, 08:55 PM
#2
Hyperactive Member
Re: passing value to crystal report
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.
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
}
hope that helps.
-
Jul 29th, 2005, 09:46 PM
#3
Thread Starter
Fanatic Member
Re: passing value to crystal report
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.
-
Jul 29th, 2005, 09:54 PM
#4
Hyperactive Member
Re: passing value to crystal report
then you should put a parameter fields in you crystal report and that code above.
-
Jul 29th, 2005, 10:00 PM
#5
-
Jul 29th, 2005, 10:13 PM
#6
Thread Starter
Fanatic Member
Re: passing value to crystal report
ok fret, how to show the field explorer .
-
Jul 29th, 2005, 10:38 PM
#7
Hyperactive Member
Re: passing value to crystal report
it is already there in your crystal report design.
-
Jul 29th, 2005, 10:45 PM
#8
Thread Starter
Fanatic Member
Re: passing value to crystal report
It is invisible in my c# app. but in crystal report designer its ok.
popskie
-
Jul 29th, 2005, 10:56 PM
#9
Hyperactive Member
Re: passing value to crystal report
 Originally Posted by popskie
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.
-
Jul 29th, 2005, 11:04 PM
#10
Thread Starter
Fanatic Member
Re: passing value to crystal report
pls take alook the attach doc file.
popskie
Last edited by popskie; Mar 22nd, 2007 at 02:21 AM.
-
Jul 29th, 2005, 11:13 PM
#11
Hyperactive Member
Re: passing value to crystal report
i see....ehehe there's no "field explorer" try press Ctrl+Alt+T.
-
Jul 30th, 2005, 12:03 AM
#12
Thread Starter
Fanatic Member
Re: passing value to crystal report
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|