Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ggarza75
Yak Posting Veteran
50 Posts |
Posted - 2012-04-23 : 15:18:10
|
I'm working on a report and this is the last piece I need to complete it.In one of the column of the report, the column has this Crystal Report expression.whileprintingrecords;stringVar DiscrepencyCodes :="";if (InStr({VIEW_Creditors.DISCREPENCY CODE},{?Contingent Code}) > 0) thenDiscrepencyCodes := DiscrepencyCodes & trim({?Contingent Code})elseDiscrepencyCodes := "";if (InStr({VIEW_Creditors.DISCREPENCY CODE}, {?Unliquidated Code}) > 0) thenDiscrepencyCodes := DiscrepencyCodes & trim({?Unliquidated Code})elseDiscrepencyCodes := DiscrepencyCodes;I have no idea how to translate this into SSRS. I only worked with CR for a few months before we moved onto SSRS, so some of the expressions in CR do not make sense to me, just like this one.Hope someone can help with the little information I provided here. Thanks! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-04-23 : 15:24:31
|
you need to use IIF instead of if else in SSRShttp://msdn.microsoft.com/en-us/library/27ydhh0d(v=vs.71).aspxInstr is also avaiable on SSRShttp://msdn.microsoft.com/en-us/library/8460tsh1(v=vs.80).aspxI'm not sure code above is in custom code part or used inside report body in CR (I have not worked with CR)So in SSRS the corresponding expression if inside body would be= IIF(Instr(Fields!DISCREPENCY CODE.value,Parameters!Contingent Code.value)>0,true part...,flase part)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|