Error at the end of the statement SSRS expression , couldn"t find it? - ssrs-2008

=
"<b>"+ "Created on: " + "</b>" & CDate(Fields!ticket_ticketSolutions_date_create.Value).ToString("dd/MM/yy HH:mm"))
& Environment.NewLine
& "<b>" + "Approval date: " + "</b>" & iif (IsNothing(Fields!date_approval.value),"Not Approved",CDate( Fields!date_approval.Value).ToString("dd/MM/yy HH:mm"))
& Environment.NewLine
& "<b>" + "Solutions: " +"</b>" & Fields!ticket_ticketSolutions_content_plainText.Value
The Value expression for the textrun 'solution_all.Paragraphs[0].TextRuns[0]' contains an error: [BC30205] End of statement expected.
The definition of the report '' is invalid.
I don't understand where are my errors ?? as I created a calculated fields that contains this formula

You have mis-matching )s on line 2 . Remove the end ).

Related

Crystal report make string bold

I need to make the first string in this formula bold, can anyone help with this?
I am posting below a single fragment of the formula first and after the full formula including the fragment, appreciate all the help.
string in question:
if ({IIS_EPC_EML_MDOC.cardname}) <> "" then
InvAddr:=InvAddr + chr(13) + {IIS_EPC_EML_MDOC.cardname} + ChrW(13) ;
full formula:
WhilePrintingRecords;
Local StringVar InvAddr;
InvAddr:="";
if ({IIS_EPC_EML_MDOC.cardname}) <> "" then
InvAddr:=InvAddr + chr(13) + {IIS_EPC_EML_MDOC.cardname} + ChrW(13) ;
if not isnull({IIS_EPC_EML_MDOC.address}) then
InvAddr:=InvAddr + {IIS_EPC_EML_MDOC.address} + ChrW(13);
//if not isnull({IIS_EPC_EML_MDOC.VatNo}) then
// InvAddr:=InvAddr + 'VAT No:'+{IIS_EPC_EML_MDOC.VatNo};
//Add EORI Number
if ({IIS_EPC_EML_MDOC.BPEORINumber}) <> "" then
InvAddr:=InvAddr + chr(13) + "EORI No.: " + {IIS_EPC_EML_MDOC.BPEORINumber};
//Add VAT Number
if ({IIS_EPC_EML_MDOC.vatno}) <> "" then
InvAddr:=InvAddr + chr(13) + "VAT No.: " + {IIS_EPC_EML_MDOC.vatno};
//Strip out trailing blank spaces from address block
while instr(InvAddr," "+Chr(13)) > 0 do
(
InvAddr:=Replace(InvAddr," "+Chr(13),Chr(13));
);
//Strip out blank lines from address block
while instr(InvAddr,Chr(13)+Chr(13)) > 0 do
(
InvAddr:=Replace(InvAddr,Chr(13)+Chr(13),Chr(13));
);
InvAddr
best Regards,
Daniel
One option is to construct the text as HTML with bold text where you desire.
Then, right-click the formula,
select Format Field...
Select 'Paragraph' tab
and set 'Text Interpretation' to 'HTML text'.

Is there a way to wrap text in Excel VBA form listbox?

Is there a way to wrap text in Excel VBA form listbox?
item = item & WorksheetFunction.Rept(" ",30 - Len(item))
subtotal = WorksheetFunction.Rept(" ", 10 - subtotal_pad) & _
"$ " & WorksheetFunction.Rept(" ", subtotal_pad - Len(Format(subtotal, "0.00"))) & Format(subtotal, "0.00")
taxed = " "
If tax_rate <> 0 Then
taxed = " T"
End If
description = ""
If description <> "" Then
description = vbNewLine & " - " & description
End If
quantity = ""
If unit <> "ea" Then
quantity = vbNewLine & " - " & quantity & " # $" & Format(cost, "0.00#") & "/" & unit
End If
lbxCharges.AddItem (item & subtotal & taxed & description & quantity)
This is how it looks:
but this is how it should look:

Get previous day in an Expression

Just need help on this as I am new at SSIS. I got an expression but I want yesterday, not today.
"Daily "+ (RIGHT("0" + (DT_STR,4,1252) DatePart("yyyy",getdate()),4))+(RIGHT("0" + (DT_STR,4,1252) DatePart("mm",getdate()),2))+(RIGHT("0" + (DT_STR,4,1252) DatePart("dd",getdate()),2))+".CSV"
Currently it looks like this
Daily 20161006.CSV
What I want is
Daily 20161005.CSV
Here you go.
"Daily "
+ (DT_WSTR, 4) YEAR(DATEADD("day",-1,GETDATE()))
+ RIGHT("0" + (DT_WSTR, 2) DATEPART("MM", DATEADD("day", -1, GETDATE())),2)
+ RIGHT("0" + (DT_WSTR, 2) DATEPART("DD", DATEADD("day", -1, GETDATE())),2)
+ ".CSV"
It looks like you are in Australia, so it is 20161006 there, but in US Right now, it is 20161005, and see how it shows yesterday i.e. 20161004 in the file name when I clicked Evaluate value
"Daily "+ (RIGHT("0" + (DT_STR,4,1252) DatePart("yyyy",getdate()),4))+(RIGHT("0" + (DT_STR,4,1252) DatePart("mm",getdate()),2))+(RIGHT("0" +(DT_STR,4,1252) (DatePart("dd",getdate())-1),2))+".CSV"
This should work.

Crystal Script condition statement 'This field name is not known' error

this is my current condition statement
IF {AR_DEBIT.InvoiceNo} = "" THEN {AR_DEBIT.Description}
ELSE {AR_DEBIT.Description} & "(" & {AR_DEBIT.InvoiceNo} & " - " & ToText({AR_DEBIT.InvoiceDate}, "dd-MMM-yyyy") & ")"
not working...prompt error IF {AR_DEBIT.InvoiceNo} = "" THEN this field is not known bla bla something like that...
when i remove the condition,
{AR_DEBIT.Description} & "(" & {AR_DEBIT.InvoiceNo} & " - " & ToText({AR_DEBIT.InvoiceDate}, "dd-MMM-yyyy") & ")"
the report show no error...anybody?

libpq, insert with parameters

I am wondering if I can make parameterized queries directly from C/C++ with libpq instead of using strings and if do how should this code look's like?
string tblins = "";
tblins = "INSERT INTO " + commtable + " "
"(vdoc, bdoc, mytime, txml) VALUES ("
"'" + cxml.vdoc + "', "
+ cxml.bdoc + ", " //integer
"'" + cxml.mytime + "', "
"'" + cxml.txml + "')";
result = PQexec(conn, tblins.c_str());
Thanks.
Yes, you can use the PQexecParams function as explained in the documentation.
If parameters are used, they are referred to in the command string as $1, $2, etc. nParams is the number of parameters supplied; it is the length of the arrays paramTypes[], paramValues[], paramLengths[], and paramFormats[].