Passing Value :Form to Crystal Report using Textobject with databse

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;

string Query = “SELECT  * from Table1”;
ds = new DataSet();
ds = lb.DataView(Query);
Deposit a = new Deposit(); //Dataset
CheckOutReport r = new CheckOutReport(); //Crystal Report
TextObject TO;  //textobjext
TO = (TextObject)r.ReportDefinition.Sections[0].ReportObjects[“Text8”]; //Textobject Name
TO.Text = “Patron Type: ” + rb1Member.Text; //Passing Value

for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
if (a.Tables[1].Rows.Count == 0)
lblRowEmpty.Text = “The Mmeber Check Out is Empty”;
lblRowEmpty.Text = “”;
ReportViewerCheckOut.ReportSource = r;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: