Skip to Content
0

selection criteria not working in crystal reports 2013 runtime

Mar 29, 2017 at 04:02 PM

23

avatar image

Any Crystal Report I run using my VB.Net program returns all values in the database, regardless of the selection criteria entered. Currently running Crystal Reports runtime engine for .NET Framework V13.0.17.2096

This was not a problem when using Crystal Reports Basic Runtime for Visual Studio 2008.

tried commenting out the following:

'Me.CrystalReportViewer.SelectionFormula = ""
'Me.CrystalReportViewer.ViewTimeSelectionFormula = ""

that did not work.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Don Williams
Mar 29, 2017 at 07:59 PM
0

Try searching first:

// Record selection formula with comments included can only be retrieve via RAS
CrystalDecisions.ReportAppServer.DataDefModel.ISCRFilter myRecordSelectionWithComments; // = new CrystalDecisions.ReportAppServer.DataDefModel.;
myRecordSelectionWithComments = rptClientDoc.DataDefController.DataDefinition.RecordFilter;
if (myRecordSelectionWithComments.FreeEditingText != null)
{
//myRecordSelectionWithComments.FreeEditingText = rptClientDoc.DataDefController.RecordFilterController.GetFormulaText();
btnRecordSelectionForm.Text = "\nWith Comments:\n" + myRecordSelectionWithComments.FreeEditingText.ToString();
btnRecordSelectionForm.AppendText("\n\n");
btnRecordSelectionForm.AppendText("\nWithout Comments:\n" + rpt.RecordSelectionFormula.ToString());
btnRecordSelectionForm.AppendText("\n");
//myRecordSelectionWithComments.FreeEditingText = "{TStat.TArt_Cod} = \"A823/001\"";
//rpt.RecordSelectionFormula = "{TStat.TArt_Cod} = \"A823/001\"";
//IsRpt = false;
}
else
btnRecordSelectionForm.Text = "No Record Selection formula";

//rpt.RecordSelectionFormula = @"(if {rpt_PI_Reports;1.pi_mu_report} = 'sum' then uppercase(trim({rpt_PI_Reports;1.contractor})) <> 'UNCOMMITTED: ADDON' else {rpt_PI_Reports;1.pi_number} <> '9999999') and {rpt_pi_reports;1.tenant_id} in [2873,2884,2889,2891,2893,2894,2901,2909,2910,2911,2912,2913,2914,2915,2916,2917,2943,2944,2945,3379,3380,2946,2971,2972,2994,2997,2998,2999,3005,3006,3025,3026,3027,3028,3032,3033,3038,3039,3046,3047,3048,3049,3050,3051,3063,3089,3090,3098,3099,3100,3120,3137,3138,3165,3168,3170,3171,3190,3194,3195,3204,3205,3246,3247,3248,3255,3256,3262,3263,3265,3266,3272,3273,3277,3278,3293,3294,3295,3296,3298,3300,3301,3306,3317,3325,3326,3327,3330,3331,3336,3337,3338,3341,3346,3347,3360,3361,3364,3376,3377,3378]";
//btnRecordSelectionForm.Text = rpt.RecordSelectionFormula.ToString();

Share
10 |10000 characters needed characters left characters exceeded