rowmark
asked on
If condition in the string builder.
Hello Experts,
I am building XML string to create a RDL file> Below is a piece of code from the same.
writer.WriteStartElement(" Style");
writer.WriteElementString( "TextDecor ation", "Underline");
writer.WriteElementString( "FontWeigh t", "700");
writer.WriteElementString( "FontSize" , "9pt");
writer.WriteElementString( "Color", "DarkSlateBlue");
writer.WriteEndElement(); // Style
Currently the Color is hadcoded as DarkSlateBlue.
I need to write a condition for the color as shown as below
Iif(RowNumber("OrderDetail ") Mod 2, "White", "AliceBlue")
How do I do this in the writer.WriteElementString( "Color", "DarkSlateBlue"); something like this
I am building XML string to create a RDL file> Below is a piece of code from the same.
writer.WriteStartElement("
writer.WriteElementString(
writer.WriteElementString(
writer.WriteElementString(
writer.WriteElementString(
writer.WriteEndElement(); // Style
Currently the Color is hadcoded as DarkSlateBlue.
I need to write a condition for the color as shown as below
Iif(RowNumber("OrderDetail
How do I do this in the writer.WriteElementString(
ASKER
I am getting an error saying RowNumber cannot exist in the current context and
Error 1 Unexpected character sequence. Expected a property name for the "<property> : <value>" declaration.
How do I build a string that will return exactly like the one shown below:
=Iif(RowNumber("Table1") Mod 2, "White", "AliceBlue")
writer.WriteElementString( "Backgroun dColor", "=Iif(RowNumber('Table1') Mod 2, 'White', 'AliceBlue')");
Instead of single quote for Table1 and White and AliceBlue if we make them double quotes it will work.
Pls help
Error 1 Unexpected character sequence. Expected a property name for the "<property> : <value>" declaration.
How do I build a string that will return exactly like the one shown below:
=Iif(RowNumber("Table1") Mod 2, "White", "AliceBlue")
writer.WriteElementString(
Instead of single quote for Table1 and White and AliceBlue if we make them double quotes it will work.
Pls help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
C#:
writer.WriteElementString(
VB.NET:
writer.WriteElementString(