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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to fill a field in crystal reports

Status
Not open for further replies.

marcello62

Technical User
Jun 19, 2006
42
NL
Hi there,

I have created a crystal report based on a dataset. In the page header, I want to display the name of a user, who can be known in code at runtime but who is not registered in the database. I'd like to know if there is a method to get this information in a textfield in the pageheader, without having to perform all kinds of difficult tricks to get the username in the dataset, where it really does not belong.

Any help will be greatly appreciated.

Thanks

 
Thanks Ido,

But the retrieval of the users is not the problem. The problem is how to get them in a field on a report which is already defined - based on a dataset. So the report is a set of records from a database, and I want to pass the names as strings to a field in the report or page header.
 
Do you mean that the name is in a dataset that cannot be related to the main dataset? If so, you could maybe fetch it using a subreport in the report header, passing it back as a Shared Variable.



[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
If you want to manually enter the user name, you could create a string parameter {?UserName} and place it in the header. Then you would be prompted to enter the name with each report refresh.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top