Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Global VB>Net variable into CR 9 report 1

Status
Not open for further replies.

Ragnarox

Programmer
Oct 2, 2003
141
US
Hello all,

I need to know if it is possible to take a global variable in VB.Net and place it into a CR 9 report. I am needing the name of the person currently logged onto the app and place it in a letter.

Any help, as always, is greatly appreciated.

Brian
 
Create a formula in the report named UserName and put "" (two double quotes) as its text. Place the formula field where you want it on the report. Before sending the report to the Viewer (or printer), set the formula text like this:
[tt]
YrRptObject.DataDefinition.FormulaFields.Item("UserName").Text = "'" & gstrUserName & "'"
[/tt]

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top