Friday, March 30, 2012

Report Parameter to return a "NULL" value

All
I am writing a report by salesperson and have the salespersons name as
a report Parameter however in the database it can return a NULL value
is the sale was genereated by someone other than the sales team. In
order for me to get the correct totals i need to include the NULL
value but if i select NULL it returns a blank report?
Any ideas?
cheersOn Jun 18, 3:38 am, blueboy <matt_me...@.hotmail.com> wrote:
> All
> I am writing a report by salesperson and have the salespersons name as
> a report Parameter however in the database it can return a NULL value
> is the sale was genereated by someone other than the sales team. In
> order for me to get the correct totals i need to include the NULL
> value but if i select NULL it returns a blank report?
> Any ideas?
> cheers
If I understand you correctly, have you tried using a value similar to
"Non Applicable" or some other descriptor that represents the null
value in the report parameter. That way, in the stored procedure/query
that is sourcing the report you can check for "...if @.SalesPerson ='Non Applicable' begin select * from table_x where salesperson is
null... end..." Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

No comments:

Post a Comment