Passing login Id to the text object in crystal report viewer using asp.net c#

Posted on 2010-04-07
Medium Priority
Last Modified: 2012-05-09
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;
        string rptFile = "CrystalReport1.rpt";
        string myStudentId = "102346";
        string fileName = Server.MapPath(rptFile);
        doc.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, true, myStudentId);

Question by:Sirdots
LVL 101

Accepted Solution

mlmcc earned 1500 total points
ID: 30068397
I assume the report is working and you just need to know how to pass a value.

This link shows how to do it with a parameter in VB



Author Closing Comment

ID: 31711992
This gives an idea. It doesnt really show how to create parameter fields in crystal report

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Watch the video of Kernel Migrator for SharePoint, which demonstrate the process easily of migration from SharePoint to SharePoint, OneDrive for Business & Google Drive servers, Public Folder to SharePoint, File Server to SharePoint. The tool has va…

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question