Creating a Path containing backslash for Automation in Report Builder

forum.centura.team.developer (1998-2005) & forum.sqlwindows (2000-2005)
Alexander Loose

Creating a Path containing backslash for Automation in Report Builder

Post by Alexander Loose » 21 Oct 2007, 13:27

 Posted by:  Alexander Loose <a...@loonet.de> 

Hello,

I have the problem that I want to create a controllstring for a
programm called Maxx PDF Mailer which must contain a path with
backslashes.

The string should be like this:

@@df\Serverdiryearmonth@@

The year and month must be extractet from a Data Date Variable called
Datum_Rechnung = 01.01.2007.

Therfore I created a formula string like this:

'@@df\Serverdir' || StrRight( DateToStr( Datum_Rechnung), 4) || ''
|| StrMid( DateToStr( Datum_Rechnung), 3, 2 ) || '@@'

But the formula string is not being interpretet.
When I remove the backslashes the formula is interpretet and it works.
But I need the path because the controllstring let the Maxx PDF Mailer
store a pdf document at the specified path.

I hope you can help me,

Greetings from Germany

Alexander

BFESTA

Creating a Path containing backslash for Automation in Report Builder

Post by BFESTA » 22 Oct 2007, 14:54

 Posted by:  BFESTA <bfe...@markelcorp.com> 

That's because the is an escape character. What you need to do is
double up the slashes like so:

'@@df\\Server\dir\' || StrRight( DateToStr( Datum_Rechnung), 4) ||
'\' || StrMid( DateToStr( Datum_Rechnung), 3, 2 ) || '@@'

Alexander Loose

Creating a Path containing backslash for Automation in Report Builder

Post by Alexander Loose » 22 Oct 2007, 21:20

 Posted by:  Alexander Loose <a...@loonet.de> 

Thanks to you, but I already tried that.
Does anyone know another solution?I am shure there is a solution, but
unfortunately the problem still exists.

Thanks ti you,
Alex

BFESTA

Creating a Path containing backslash for Automation in Report Builder

Post by BFESTA » 23 Oct 2007, 14:52

 Posted by:  BFESTA <bfe...@markelcorp.com> 

Well your other option is Centura supports double quotes and then
there is no escape character:

"@@df\Serverdir" || StrRight( DateToStr( Datum_Rechnung), 4) || ""
|| StrMid( DateToStr( Datum_Rechnung), 3, 2 ) || "@@"

If this still doesn't work can you pass the first suggestion I gave
you into a bind variable then post the actual output?

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests