Sirdots
asked on
Passing login Id to the text object in crystal report viewer using asp.net c#
I have two web forms. One is a login page
and the other is the main page
Main page uses a crystal report viewer to
display a document
users will log in with user id and password using
forms authentication
1. On the report footer, I want to display the user Id
on a text object, entered at logon, a time stamp on
another text object and then on the click of a button
create a pdf file(pdf file creation is working)
Is it possible to pass values to this text objects?
Code for pdf creation
-------------------------
protected void Button1_Click(object sender, EventArgs e)
{
ReportDocument doc = new ReportDocument();
Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();
string rptFile = "CrystalReport1.rpt";
string myStudentId = "102346";
string fileName = Server.MapPath(rptFile);
doc.Load(fileName);
//doc.ExportToHttpResponse (ExportFor matType.Po rtableDocF ormat,Resp onse,true, "Customers ");
doc.ExportToHttpResponse(C rystalDeci sions.Shar ed.ExportF ormatType. PortableDo cFormat, Response, true, myStudentId);
}
and the other is the main page
Main page uses a crystal report viewer to
display a document
users will log in with user id and password using
forms authentication
1. On the report footer, I want to display the user Id
on a text object, entered at logon, a time stamp on
another text object and then on the click of a button
create a pdf file(pdf file creation is working)
Is it possible to pass values to this text objects?
Code for pdf creation
-------------------------
protected void Button1_Click(object sender, EventArgs e)
{
ReportDocument doc = new ReportDocument();
Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();
string rptFile = "CrystalReport1.rpt";
string myStudentId = "102346";
string fileName = Server.MapPath(rptFile);
doc.Load(fileName);
//doc.ExportToHttpResponse
doc.ExportToHttpResponse(C
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER