C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Passing Value into Parameter Field of Crystal Report During Run time


Posted Date: 23 Mar 2007    Resource Type: Code Snippets    Category: Crystal Reports

Posted By: Prajith mp       Member Level: Silver
Rating:     Points: 10



This code sample shows how to pass a parameter to Crystal Reports using C# syntax.


CrystalDecisions.Shared.ParameterFields pfields = new CrystalDecisions.Shared.ParameterFields();
CrystalDecisions.Shared.ParameterField pfield = new CrystalDecisions.Shared.ParameterField();
CrystalDecisions.Shared.ParameterDiscreteValue disvalue = new CrystalDecisions.Shared.ParameterDiscreteValue();


disvalue.Value = "This Is a Parameter Value"; // Parameter Value
pfield.Name = "c1"; // Parameter Name

pfield.CurrentValues.Add(disvalue);
pfields.Add(pfield);

crystalReportViewer1.ParameterFieldInfo = pfields; //U must use crystalReportViewer

crystalReportViewer1.ReportSource = @"G:\WindowsApplication1\WindowsApplication1\crpt.rpt";






Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Previous Resource: Convert a Crystal Report to PDF
Return to Discussion Resource Index
Post New Resource
Category: Crystal Reports


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

it support

Contact Us    Privacy Policy    Terms Of Use