|
-
Sep 22nd, 2011, 06:44 AM
#1
Thread Starter
Hyperactive Member
crystal,report blank
hi ive a crystal report which loads using the code beloew... the report is showing all blank except the parameter values... plz help...
Code:
ReportDocument cryRpt = new ReportDocument();
//cryRpt.Load("C:\\Documents and Settings\\Vaibhav\\Desktop\\powertech\\report2.rpt");
cryRpt.Load("E:\\powertech\\crystalreport1.rpt");
cryRpt.Load("E:\\powertech\\crystalreport1.rpt");
//cryRpt.Load("C:\\Documents and Settings\\admin\\Desktop\\powertech\\Report2.rpt");
//cryRpt.Load("H:\\powertech\\Report2.rpt");
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
Tables CrTables;
ParameterFieldDefinitions crParameterFieldDefinitions ;
ParameterFieldDefinition crParameterFieldDefinition ;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = cmbChallanno.Text ;
crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["invno"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
crParameterDiscreteValue.Value = cmbCustname.Text;
crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["custName"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
//crConnectionInfo.ServerName = "YOUR SERVERNAME";
//crConnectionInfo.DatabaseName = "DATABASE NAME";
//crConnectionInfo.UserID = "USERID";
//crConnectionInfo.Password = "PASSWORD";
//CrTables = cryRpt.Database.Tables;
//foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
//{
// crtableLogoninfo = CrTable.LogOnInfo;
// crtableLogoninfo.ConnectionInfo = crConnectionInfo;
// CrTable.ApplyLogOnInfo(crtableLogoninfo);
//}
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
-
Sep 22nd, 2011, 04:30 PM
#2
Re: crystal,report blank
it might help if you ask vb questions in the vb forum + c# questions in the c# forum
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|