Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
when i use VS 2008 i used following codes to load appropriate report, but after i convert it to new Crystal report version alone with new report viewer that support VS 2010 to VS 2013 , the same codding to load command not working, gives no error, it just freeze and hang forever until stop debug.



i'm using Crystal Reports 13.0.10 version to VS 2010

01. this report to discard item load:

string selectFormula = "({ItemDiscard.DiscardID}= '" + frmdis.txt_DiscardID.Text + "')";
crystalReportViewer1.SelectionFormula = selectFormula;
REPORTS.Rpt_Discard gdrreport = new Rpt_Discard();
crystalReportViewer1.ReportSource = gdrreport;


02. GRN item load :

string selectFormula = "({View_RPT_GRN.GRNID}= '" + frmgrn.txt_GRN_id.Text + "')";
crystalReportViewer1.SelectionFormula = selectFormula;
REPORTS.Rpt_GRN grnreport = new REPORTS.Rpt_GRN();
crystalReportViewer1.ReportSource = grnreport;

these same codes all are works in VS 2008 with Crystal Reports 12
Posted

1 solution

i've solve this myself;

C#
string vardisid = frmdis.txt_DiscardID.Text;

           string selectFormula = "({ItemDiscard.DiscardID}= '" + vardisid + "')";
           crystalReportViewer1.SelectionFormula = selectFormula;
           REPORTS.Rpt_Discard gdrreport = new Rpt_Discard();
           crystalReportViewer1.ReportSource = gdrreport;



i introduce temporary object first to pass, other form textbox value:

string vardisid = frmdis.txt_DiscardID.Text;

then this "vardisid" use for report selection formula text: bingo, it work like charm.

string selectFormula = "({ItemDiscard.DiscardID}= '" + vardisid + "')";

thanks!
 
Share this answer
 
Comments
thatraja 2-Sep-14 3:49am    
Well done you have solved it yourself, 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900