Variables comes empty

Oct 18, 2010 at 5:58 PM

Hi,

I have a weired issue, when using the HTML table with HTML mail, all variables comes empty !

I have the data from the HTML table into one vriable, and some other variables into one big variable.

 

when I use that big expression varaible, the e-mail comes with empty variables!

any suggestion?

Coordinator
Oct 21, 2010 at 12:26 AM

Can you please describe your package setup more completely?

Specifically, can you tell me exactly how you have the Send HTML Mail Task configured - perhaps taking a screen shot of the editor?

Additionally, can you place a breakpoint on the Send HTML Mail Task, then run the package.  When the execution breaks, please open the Locals window and view the contents of the variables node.  Post those details here.

Oct 21, 2010 at 4:51 PM
Hi Todd,
Thank you for your reply, and sorry for not being clear in my last post
bassicly i'm splitting the data in the pipe to DATA and NON-DATA and E-mailing the non-data using the HTML TABLE

attached are my screen shots ...

the problem is when I use the 'NON-DATA' variable, which gets populated of the HTML TABLE, the tables comes correctly.
But when I nest that Varaible inside another Variable "E-mail" the e-mail comes with empty variables and the Table variable is is empty too.

but when I remove the HTML table from the package, all the variables comes correctly.

All what i need to do here to be able to send some other data like row numbers , dates and some stuff with the table.


my E-mail variable is:

"

File Name: " + @[User::FileName] +"\n"+
"

File Size: " + (DT_WSTR, 10) @[User::NonDataRows] +" KB" +"\n"+
"

Original Data Rows: " + (DT_WSTR, 10) @[User::OriginalRows] +"\n"+
"

"+" Data Rows: " + (DT_WSTR, 10) @[User::DataRows]+"\n"+
"

Non Data Rows: " + (DT_WSTR, 10) @[User::NonDataRows] +"\n"+
"

"+@[User::NonData]+"
<br>"

Thanks for yoru time.



From: [email removed]
To: [email removed]
Date: Wed, 20 Oct 2010 17:26:50 -0700
Subject: Re: Variables comes empty [sendhtmlmailtask:231355]

From: toddmcdermid
Can you please describe your package setup more completely?
Specifically, can you tell me exactly how you have the Send HTML Mail Task configured - perhaps taking a screen shot of the editor?
Additionally, can you place a breakpoint on the Send HTML Mail Task, then run the package. When the execution breaks, please open the Locals window and view the contents of the variables node. Post those details here.
Read the full discussion online.
To add a post to this discussion, reply to this email (sendhtmlmailtask@discussions.codeplex.com)
To start a new discussion for this project, email sendhtmlmailtask@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Coordinator
Oct 27, 2010 at 1:17 AM

OK - you have one issue which is probably making it look like the table isn't there, when in fact, only a part of it is.

Second, when the HTML Table Destination builds a table, it usually has to build a REALLY LONG STRING.  Because it has to add all kinds of HTML markup for each and every row in the table.  This can almost certainly lead to a string longer than 4000 characters.  SSIS can't perform expressions on strings longer than 4000 characters.  The result is that your expression gets truncated - which means there won't be a </TABLE> terminator on the string, which means the table won't render.

How do you "do expressions" when the result will exceed 4000 characters?  You have to perform those operations using VB.Net or C# inside a Script Task.

Oct 27, 2010 at 1:21 AM
Thank you for getting back to me anyway.
I've worked around it by using SSRS MHTML report sent in the e-mail, included all the results from a temperory table.

Thank you.


From: [email removed]
To: [email removed]
Date: Tue, 26 Oct 2010 18:17:42 -0700
Subject: Re: Variables comes empty [sendhtmlmailtask:231355]

From: toddmcdermid
OK - you have one issue which is probably making it look like the table isn't there, when in fact, only a part of it is.
Second, when the HTML Table Destination builds a table, it usually has to build a REALLY LONG STRING. Because it has to add all kinds of HTML markup for each and every row in the table. This can almost certainly lead to a string longer than 4000 characters. SSIS can't perform expressions on strings longer than 4000 characters. The result is that your expression gets truncated - which means there won't be a terminator on the string, which means the table won't render.
How do you "do expressions" when the result will exceed 4000 characters? You have to perform those operations using VB.Net or C# inside a Script Task.
Read the full discussion online.
To add a post to this discussion, reply to this email (sendhtmlmailtask@discussions.codeplex.com)
To start a new discussion for this project, email sendhtmlmailtask@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com