Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Expression Error Expand / Collapse
Author
Message
Posted Tuesday, October 16, 2012 3:05 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Hi geniuses,
I'm having problems with a traffic light indicator expression:

=SWITCH(
ReportItems!Textbox21.Value="1.1.PC" and ReportItems!Textbox23.Value<>"",0,
ReportItems!Textbox21.Value="4.2.PP" or "4.3.PE" or "4.4.S" and ReportItems!Textbox23.Value="",1,
ReportItems!Textbox21.Value="1.1.PC" or "1.2.PV" or "1.3.PNV",2
)

The error: ...an error: Input string was not in a correct format.
But if I only use:

=SWITCH(
ReportItems!Textbox21.Value="1.1.PC" and ReportItems!Textbox23.Value<>"",0,1
)
It works fine.

???
Thanks
Regrdas
Post #1373085
Posted Tuesday, October 16, 2012 4:06 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, January 7, 2014 2:21 PM
Points: 132, Visits: 557

ReportItems!Textbox21.Value="4.2.PP" or "4.3.PE" or "4.4.S" and ReportItems!Textbox23.Value="",1


You got to change the above line to :

(ReportItems!Textbox21.Value="4.2.PP" or ReportItems!Textbox21.Value="4.3.PE" or ReportItems!Textbox21.Value="4.4.S") and ReportItems!Textbox23.Value="",1


BI Developer
SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
Please visit... ApplyBI
Post #1373102
Posted Wednesday, October 17, 2012 5:21 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Hi I'm getting a warning error while rendering my report, it says that 'Input string was not in a correct format.'

=SWITCH(
ReportItems!Textbox70.Value="2.2.PA" and IsNothing(Lookup(Fields!ProjectGUID.Value, Fields!ProjectUID.Value, Fields!PBSD.Value, "DataSet3")),1,
ReportItems!Textbox70.Value="2.2.PA" and Lookup(Fields!ProjectGUID.Value, FIelds!ProjectUID.Value, Fields!PBSD.Value, "DataSet3")="",2,
ReportItems!Textbox70.Value="1.1.PC" or "1.2.PV" or "2.1.PS",3)

It is for sure because, when I want to to know if Fields!PBSD.Value is = "" or not.
Any solution?

Thanks
Regards
Post #1373731
Posted Wednesday, October 17, 2012 6:11 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, January 7, 2014 2:21 PM
Points: 132, Visits: 557
PLEASE REFER TO MY PREVIOUS POST...

BI Developer
SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
Please visit... ApplyBI
Post #1373751
Posted Wednesday, October 17, 2012 6:57 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Anyway, it gives me the same error.

Thanks!
Post #1373769
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse