Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want to pass a value to crystal report header. I'm able to pass a list of values to details section of report but unable to report header.
Actually I want to display a piece of data so I took column name from "field explorer". Can you help to display the piece of data from form to report header?
Posted
Updated 4-Jan-11 0:39am
v2

1 solution

You can use Parameter in report
Or
Add a Text box in the header of the report.
Change the "Name" of the Text box to say "txtHead"
Now in your application write those code
Dim objText As CrystalDecisions.CrystalReports.Engine.TextObject
objText = rptReport.Section4.ReportObjects("txtHead")
objText.Text = ds2.tables(0).rows(0)("HEADER")


Note this code is in VB.Net. Please convert it in C# in your way
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900