How to use Crystal Report Selection Formula manually in my Crystal Report page.


I have Link button on each gridview row and I want to take priview of that row through Crystal Report viewer when I click on Link Button on Gridview row. 

In this  CrystalReports1.aspx.cs page I am using record number '35' and it is showing this record correctly but I want to view the each record which is clicked on Linkbutton.




<asp:LinkButton ID = "commandSelect" text = "Preview" Runat="Server" OnClick="commandSelect_Click"/>




protected void commandSelect_Click(object sender, EventArgs e)



LinkButton btn = new LinkButton();

btn = (LinkButton)sender;

GridViewRow grdRow = ((GridViewRow)btn.Parent.Parent);string keyID;

keyID = grdRow.Cells[1].Text.Trim();

//where Cells[1] is the column index where you store your primary key

Session["Quotation_No"] = keyID;this.Response.Redirect("CrystalReports1.aspx");



protected void Page_Load(object sender, EventArgs e)


 // Here I want to change but not aware how to apply code when click on Link Button.

this.CrystalReportViewer1.SelectionFormula = "{Quotation_Master.QUOTATION_NO} = 35";

// I want to change here what will be the code for display the record on click the link button.

I put here Quotation_No = 35 which record is displaying on Link button click.




9/1/2008 4:14:59 AM 7043 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 48

 // Here I want to change but not aware how to apply code when click on Link Button.

this.CrystalReportViewer1.SelectionFormula = "{Quotation_Master.QUOTATION_NO} = 35";

// I want to change here what will be the code for display the record on click the link button.

I put here Quotation_No = 35 which record is displaying on Link button click.


9/5/2008 7:45:06 PM

Similar Artilces:

Converting Crystal Reports 9 report to Crystal Reports .NET report
I have a web page that is supposed to display a crystal report.  The report is fully written and functional in crystal 9 (non-.Net)  .  Is there a way to convert my .rpt so that I can just include it in the new web site? why you don't try to compile project with .net and include your report. then if crystal report is power tool will suggests you with conversation tool    My blog is here.Please remember to 'Mark as Answer' if this post answered your question! Wow it really was that easy!  I just added the old crystal report into my .NET proj...

crystal reports .net -> crystal reports .net 2003
recently converted a project from .net to .net 2003. The 2 crystal reports I had in the project do not load when executing the application. The project itself within 2003 will allow me to multiplat the crystal reports, however when it comes to execution time I get the error: Invalid Data Source. If this isn't the right forum please point me to the right one as this is really the only website I know of with a large reader base. >to multiplat the crystal reports To what the crystal reports? Do you have the same database connections established and verified in your 2003 s...

How do I deploy an application using crystal reports/install crystal reports?
First of all: C# .NET framework 1.1, IIS 6.0, XP SP1, Windows forms - not ASP.NET but I don't see how it would make a differenceMy Situation: I am tasked with adding to an application the ability to generate a crystal report.  It currently has nothing to do with them.The application runs on an XP system with .NET 1.1 installed but lord only knows how it was installed on there (the guy that set it up is long gone and from past experience with his work I think he was just guessing anyways) In an attempt to see if crystal reports was installed, I wrote a quick test forms appl...

integration of Crystal Report with .NET ; crystal report viewer not displaying in Toolbox
Hi I m new to Visual Web Developer 2005 Express Edition. I want to integrate Crystal Report with .NET. In my Toolbox , Crystal Report Viewer is not displaying. How to make it possible? + How to call my report from 2.0. Need source code plz.*Share Knowledge Every TIME Crystal Reports for .NET does not come with VWD Express.  It only comes with VS 2005 Professional (I'm not sure about the Standard edition).If you have Crystal Reports 10 or XI, you can installed the .NET libraries for Crystal and then use them within VWD Express, noting that you have to build your reports ...

Export Crystal Report to Crystal Report format
I looked at some sample code provided by crystaldecisions, and they have the ability to export a web crystal report to a crystal report. I was assuming that this would cause the local instance of Crystal reports on the client machine to be invoked. I tried this in my project, and I get the following error: Error Encountered by Crystal Web Report Server -------------------------------------------------------------------------------- The error message returned is: Connection to Report Server Failed. It creates the file as an .rpt file in the directory it should. Do I need a dif...

VS .net 2005 Crystal reports ok to run on Crystal Reports XI?
I am getting mixed messages from the website hosting providers - some say they do not support Crystal Reports due to a $25,000 per cpu licensing fee, others say all I need to do is install Crystal Reports XI (about $500) on a dedicated server and it will run fine. Will Reports developed with the embeded Crystal Reports in VS 2005 run in a Crystal Reports XI environment? Thanks....

Cassini, VS.Net and Crystal Reports
Hi,I am working with Win XP home, Cassini and VS.Net.I would like to play with some Crystal Reports.I create the report in VS as CrystalReport1.I put a CrystalReportViewer on my web form. It does not get recognized as a defined object type but there are no build errors.When I run the app I get an error: Type 'CrystalReport1' is not defined.I have googled on this and see several things people have suggested/tried to correct this. Most I have already tried or the suggestions are not very clear to me. Then I came across a msg that instructed me to set up virtual directories for IIS for CrystalR...

retrieving crystal report graph images instead of using crystal report viewer
is it possible to retrieve the crystal report graph images without using the crystal report viewer.  ...

How to create Report Letter with multiple pages in C# and Crystal Report.Net using VS2008
Hi experts, I’d like to have some helps from you guys. I need to create an app with C# and Crystal Report.Net using VS 2008 for a Landscape & Nursery company.  The company will send out coupon letters to some customers who purchased something from the company within past 12 months. Users will get customers’ info from database using zip code. I have a drop-down control to populate all the eligible zip codes. The following 8 data fields will be retrieved from database; FirstName, LastName, Address1, Address2, City, State, ZipCode, and PreviousPurchased. I have a pre-defined Crystal Report Letter Template, something like: [Address1],[Address2],[City], [State], [ZipCode] Dear [FirstName] [LastName] Thank you for purchasing [PreviousPurchased], blah, blah……….. blah, blah……At the bottom of the letter is 15% off coupon for your next purchasing. blah, blah…… The coupon letter's format and content are fixed. At the very bottom of the letter is an image 15% off coupon. The only differences are the data field with the square [ ], the customers’ info. When a user select a ZipCode, for example, 92649 (Huntington Beach) returns 30 customers, the user clicks on print button, can print 30 coupon letters, and 90895 (Carson) returns 45 customers, the user can print 45 coupon letters. I know the Crystal Report.Net can create Form Letter, but just don’t know how to. There are too many samples out there for the tabulate kind reports. But I can not find a single sample for R...

Need advice on debugging my crystal report. Is there a way to execute a crystal report formula within the IDE
 Hello. I am new to crystal reports.  I am looking for ways to debug my Crystal report. Sometimes when my application generates a report, the report only displays the top of the report with no results displayed at all. I am thinking that the reason for this is that my formula sometimes returns a value of zero. In turn this results in the report not being generated. Here is my formula. Is there a way to step through the execution of this crystal reports code, without having to start my C#/ASP.NET application in the debugger? In other words within the Crystal report displayed in th...

"Logon failed error on Crystal Reports" when using oracle at backend and crystal reports
I am using VS.NET 2003 and oracle 8i database at backend. When I connect DB by ADO it connects and show tables and after making the report when I try to view it in browser there is an error of Logon failure on crystal reports. I am using VB.NET and ASP.NET. Kindly reply me soon. All in all I want to show reports in crystal reports from oracle 8i database. Haroon. can you post your code where you load the report--------------------------------------------------Sincerely,Michael ReyerosPlease remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if...

View report from the crystal report server using .NET
Hi,I am first time dealing with crystal report and I having problem with it. I need to use to link to the crystal report server and view the report, but don't know how? Is there a way to do that? or is there any better way to using .net and view report from the crystal report server?Thanks....

Is there a way to dynamically generate crystal reports using embedded crystal report viewer in visual studio ide?
I have to generate the crystal report during runtime.Can  u tell me the procedure how to do?Code is appreciated. Yes, its a little tricky but I posted here on it:  You lay out the report how you want but the data is supplied dynamically.   Eric Is there a way to generate report without using layout report before hand? Not that I'm aware of with CR.  Its not really a full SDK to develop with.  There are 3rd party reporting programs that can do this though I believe. Can u tell me some third party reporting programs and how to use them? I'm sorry but I'm not familiar with them, but I do know they exist.  Just search for 3rd party .net graphing sdks.  ...

Can we generate crystal reports programmatically using embedded crystal reports designer in visual studio ide?
I have a requirement like i have to generate crystal report based on the user's requirements during runtime?Can u suggest me how to do?...

Are there other reporting tools other than reporting services and crystal reports
Has anyone had any experience with any reporting tools other than Reporting services and Crystal reports? If so, is there one that you would strongly recommend? Or, are these two the top choice on the market for report generation from .NET? I have heard some moaning and groaning about reporting services. Specifically in regards to the amount of time needed to design a report. Crystal reports seems kind of difficult to me, as I don't have any training with it. Basically I am looking for a reporting tool that is easy to use, and can be used from .NET....

How do I incorporate a crystal report other than the crystal report provided by Visual Studio?
I'm working with the CrystalDecision version of the crystal report. How do I incorporate this into my development?...

Creating Reports using Crystal Reports for Visual Studio .NET
Hi i am trying to create a crystal report using C# coding but instead of creating a web application under new project i decided to choose create an website with C#. The problem is i get:- The report you requested requires further information. --------------------------------------------------------------------------------XP\SQLEXPRESS  Server name:    Database name:    User name:    Password:    All data is present except my password when i enter it, it works fine and the report works too with no problems. How do i remove this prompt. There is a property called "DatabaseLogonPrompt" but if i set it to false. The report will no show up telling me the parameters are incorrect. So the password has to be entered in the code but where i dont know. Build the report method: The crystal report i built in this manner. 1) Added Crystal Report from add new item2) Followed the instructions 3) Chose to create a new connection4) OLE DB5) OLEDB provider for SQL Server6) Input servername,id, password and database name from combo this created the report I installed IIS on my local pc having win xp sp2. Also have Sql express 2005 on the same machine. So i need to find a way to remove the prompt. Found codes but it was either windows applicaiton with C# or web application in vb. I want code for C# web application or website in C#. I relatively new to as i finished my .net at the end of last mo...

Reports without using Crystal Report
Hi, I just wanted to know if there is any way to create reports other than Crystal Reports. Thanks. Hi, There are many ways other than crystal reports to generate reports. But you have to purchase a third party tool for that. 'ActiveReports' from Datadynamics is one among them. Thanks,Ramprasad. Hello, There are other reporting tools as well, which do not need third party component, You can use;1) Microsoft Reporting *.rdlc with Report Viewer Control.2) SQL Server 2005 Reporting with Report Viewer Control.These are builtin control in there respective products, for m...

Crystal Report Application - report is fast. Use it in aspx page
Hello. I have some problems with my crystal reports. I have rather simple table with 6 fields. I've created Crystal Report Application in Visual Studio 2005. Designed report, tried it (both Crystal Reports X and Crystal Reports XI). All ok. It works rather fast (I've create about 700 000 records in table to test reports).  After that - I've tried to add this .rpt file to my web site:1 <asp:Content ID="contentBody" ContentPlaceHolderID="contentPlaceHolderMain" Runat="Server"> 2 <cr:CrystalReportSource ID="crystalReport...

comparing Cystal Report 10.2.3(provided by VS 2005) and Crystal Report 10.0.3(provdied by Crystal reports 10
 hi all, i was just wondering what u guys think about the two version (10.2.3 - by VS2005) and (10.0.3 - by Crystal reports 10).it seems like the Coding syntax is abit diff for the two version. (10.2.3 dont even need to mappath) i was wondering if i write the web application using 10.2.3, would i encounter problems when displaying report written by 10.0.3. opinions need, thanks! regards,martin ...

Crystal Report.NET and nested sub reports
I have a report where i need to have several nested subreports... A parent may have childs and childs may have other childs and so on... CrystalReport.NET and VS2005 seems to support one level of subreport (a report could have a nested subreport but this nested subreport can't have another nested subreport). I really need to handle multiple levels of nested subreports in order to complete my report. What is the solution ???   Thanks   Eviral     I'm not positive if this works but its worth a shot.  Create the subreports as se...

Dynamic creation of report using crystal report
Hi All,       I am using crystal report of VS .Net  2005. I have a recordset I can get indefinite no. of fields  to display. And I have to arrange it dynamically according to the required format of the report. For Ex: Case 1 : I have 10 fields to display on the report and for them I have to perform calculation also.  Case 2 : I have 5 fields to display on the report and for them I have to perform calculation also.        So, I want to arrange all the fields dynamically in the formate given. Please help me. Thanks Nitin &nb...

why to use crystal report rather than report viewer?
 why to use crystal report rather than report viewer?crystal report is not available with web development 2005 . It have report viewer . so what is the advantage of crystal report over  crystal report ? ...

Printing a report using Crystal reports and C#
I have a web page that uses the Wizard control that steps thru and collects info from a datasource. I would like to take this info , create a SelectionRecord string, pass it to a report and print the report. I do not need to view the report, I would just like to send it to the printer. Can someone send me the C# code that would handle this and were would I place the code so it prints when I click on the Finish button of the Wizard. Keep in mind I'm fairly new to C#    ...

Web resources about - How to use Crystal Report Selection Formula manually in my Crystal Report page. -

Selection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Australia v New Zealand Test cricket: Selection dilemma – Peter Siddle, James Pattinson or Chadd Sayers ...
Australia's selectors have to choose between picking an injured quick, the one coming back from injury or another who has not played at all for ...

Bombers belt Blues, Carlton coach Bolton defends young midfield selections
Match delivers a melee but it's only February, as field umpires welcome first female and Ikon Park relives the good old days. Carlton coach Brendon ...

Canberra Raiders coach Ricky Stuart faces 'welcome' selection headache
It's a headache Ricky Stuart, or the Raiders for that matter&nbsp;haven't had for a long time - the prospect of telling deserved players they ...

Canberra Raiders coach Ricky Stuart faces 'welcome' selection headache
It's a headache Ricky Stuart, or the Raiders for that matter haven't had for a long time - the prospect of telling deserved players they won't ...

"The scenario that the left would most favor and the right most fears would be the selection of a barrier-breaking ...
"The name most frequently discussed in this situation is Attorney General Loretta Lynch, who would be the first black woman to serve on the court. ...

Secrecy abides in Supreme Court selection process -
When Sonia Sotomayor first learned that President Barack Obama was nominating her to the Supreme Court, the White House made an unusual request: ...

AP PHOTOS: Editor selections from the past week in Asia
Nearly 3,000 delegates from across China gathered to kick off the annual National People's Congress in Beijing's Great Hall of the People this ...

Watchog Or Lapdog? Emails Show Hillary Had A Hand In Inspector General Selection
Watchog Or Lapdog? Emails Show Hillary Had A Hand In Inspector General Selection

Bodega Bagel Taste Test: Sietsema Reviews a Selection of Bodega Bagels
Eater's critic makes notes on a variety of bagels from local bodegas. Not all bodega bagels are created equal. There's an estimated 12,000 independently-owned ...

Resources last updated: 3/9/2016 2:00:05 AM