How do I pass vb.net variables to crystal reports

M

MeNotHome

I have a couple of variables in vb.net that I want to have printed on
my crystal reports report.

How can I do this?

Thanks for any info
 
J

Jorge

Hello

I'm not sure i understand your question but you could
assign the value of a variable to a textbox in your
report.

Kind Regards
Jorge
 
A

Armin Zingler

MeNotHome said:
I have a couple of variables in vb.net that I want to have printed
on my crystal reports report.

How can I do this?

<F1>
VS.NET
Developping with VS.NET
Creating distributed applications
Crystal reports
Implementing runtime customization
Customizing data presentation
Parameter runtime customization

(see hint in signature)


--
Armin

The tree representing the table of contents has been translated from
localized (German) version. Excuse slight deviations.

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
G

Guest

The best way I have found to pass variables is to create a text box on the report. Then, in your code, do something like this

Dim oRpt as MyRepor
DirectCast(oRpt.Section5.ReportObjects("txtMyTextBox"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = strValu

You will of course have to change Section5 to whatever section you created the text box in. I hope this helps

Jason
 
C

CJ Taylor

Yeah...

And then there is the correct way to do it...

Cystal Reports has Parameter fields... Use them.. love them...


Jason F said:
The best way I have found to pass variables is to create a text box on the
report. Then, in your code, do something like this:
Dim oRpt as MyReport
DirectCast(oRpt.Section5.ReportObjects("txtMyTextBox"),
CrystalDecisions.CrystalReports.Engine.TextObject).Text = strValue
You will of course have to change Section5 to whatever section you created
the text box in. I hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top