Link to home
Create AccountLog in
Avatar of NurveTech
NurveTech

asked on

Crystal Reports - RecordSelectionFormula issues

This is a windows Application:

I am trying to select all the records that have a submitted state of "Pending Submission"
It is not working.
it returns all data to me.
I need to figure out why its not returning the specified data.
any idea?

                hardwareSalesSum.SetDataSource(myMPSCommissionsDS);
                crystalReportViewer1.ReportSource = hardwareSalesSum;
                hardwareSalesSum.RecordSelectionFormula = "{SelectMPSCommissionsTransactionBalance.Submitted} = 'Pending Submission'";

Thank you,

NurveTech
Avatar of frodoman
frodoman
Flag of United States of America image

Try changing your record selection formula before you assign the reportsource to your viewer...

frodoman
Avatar of NurveTech
NurveTech

ASKER

Tried that already and it still does the same thing.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
for some reason the discardsaveddata is not coming up as an option for me in intelisense, and when i try to compile with it, it fails, am i missing something?
How is hardwareSalesSum declared?

You can also open the report and uncheck the SAVE DATA WITH REPORT option.

mlmcc
Can you show a more complete section of your code - I suspect the problem may be in lines that we haven't seen.

Also, if you have used the 'save data with report' option simply modify the report, unselect that option, and save it again.

frodoman
the code i have shown is all i use to try and load the data, other then the report that I created, but it doesnt save any data.
I find that difficult to believe.  For example, aren't you declaring hardwareSalesSum somewhere?  What is hardwareSalesSum anyway, is it a Reportdocument object, a .Net dataset?  

frodoman
ahh, i do that right above everything else, sorry i thought that was in there.

HardwareSalesSummary hardwareSalesSum = new HardwareSalesSummary();

hardwareSalesSum.SetDataSource(myMPSCommissionsDS);
crystalReportViewer1.ReportSource = hardwareSalesSum;
hardwareSalesSum.RecordSelectionFormula = "{SelectMPSCommissionsTransactionBalance.Submitted} = 'Pending Submission'";

This is my entire function.
What is HardwareSalesSummary?  I mean, what type of object is it?

It is the crystal report object.