Here is a very funny problem and I searched, tried every method and cannot
figure this out.
Problem: If my field has carriage returns at the start and then some text
and then again carriage return, the HTML shows fine but when exported to PDF
start Carriage returns are not displayed.
Example:
Database value:
3 carriage return and this is text.
2 Carriege return and this is final text
HTML shows:
3 carriage return and this is text.
2 Carriege return and this is final text
PDF shows:
3 carriage return and this is text.
2 Carriege return and this is final text
NO INITAL carriage return in PDF but it does leave once there is some text.
Is this the rendering problem or a bug'
Note: I am not using RTRIM or TRIM anywhere.please help....
I need this resolved for today's build.
thanks,
Rahul
"RK" wrote:
> Here is a very funny problem and I searched, tried every method and cannot
> figure this out.
> Problem: If my field has carriage returns at the start and then some text
> and then again carriage return, the HTML shows fine but when exported to PDF
> start Carriage returns are not displayed.
> Example:
> Database value:
>
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> HTML shows:
>
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> PDF shows:
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> NO INITAL carriage return in PDF but it does leave once there is some text.
> Is this the rendering problem or a bug'
> Note: I am not using RTRIM or TRIM anywhere.|||I found it.
Replace(string, CHAR(13), CHAR(0)
PDF considers char(0), NULL ad adds a carriage return.
"RK" wrote:
> please help....
> I need this resolved for today's build.
> thanks,
> Rahul
> "RK" wrote:
> > Here is a very funny problem and I searched, tried every method and cannot
> > figure this out.
> >
> > Problem: If my field has carriage returns at the start and then some text
> > and then again carriage return, the HTML shows fine but when exported to PDF
> > start Carriage returns are not displayed.
> >
> > Example:
> >
> > Database value:
> >
> >
> >
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> >
> > HTML shows:
> >
> >
> >
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> > PDF shows:
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> > NO INITAL carriage return in PDF but it does leave once there is some text.
> > Is this the rendering problem or a bug'
> >
> > Note: I am not using RTRIM or TRIM anywhere.sql
Showing posts with label figure. Show all posts
Showing posts with label figure. Show all posts
Friday, March 23, 2012
Friday, March 9, 2012
Password protection on subscription-based Excel reports
I know RS doesn't offer this now.
I'm trying to figure out a workaround.
I need to:
-run a report on a schedule
-render it to excel
-password protect it
-email it
Subscriptions would be fine if it weren't for the password issue.
I've got DotNet code create the reprot and render it as an Excel
spreadsheet.
I've got code to password-protect the spreadsheet.
I want code to control the above code - to run at a certain time and
then deliver it via email. But it doesn't look like the Subscriptions
object will do this. Subscriptions appears to create the report and
deliver it, but not allow intervention for something like password
protection.My suggestion is that you use a script outside of Reporting Services to send
the mail. You can use CDO or .NET web mail. YOu can then schedule this using
Windows scheduler.
Try using the following code in a VB Console Application (you need to add a
reference of System.Web.dll to your project):
Imports System.Web.Mail
Module Module1
Dim oMail As MailMessage = New MailMessage
Sub Main()
oMail.From = "user@.mydomain.com"
oMail.To = "administrator@.classroom.com"
oMail.Subject = "Sending Using Web Mail"
oMail.BodyFormat = MailFormat.Text
oMail.Body = "Password protected file."
Dim myfile As String = "c:\Myfile.xls"
Dim oAttachment As MailAttachment = New MailAttachment(myfile)
oMail.Attachments.Add(oAttachment)
SmtpMail.SmtpServer = "10.1.1.200"
SmtpMail.Send(oMail)
oMail = Nothing
oAttachment = Nothing
End Sub
End Module
HTH
Charles Kangai, MCT, MCDBA
"Jay" wrote:
> I know RS doesn't offer this now.
> I'm trying to figure out a workaround.
> I need to:
> -run a report on a schedule
> -render it to excel
> -password protect it
> -email it
> Subscriptions would be fine if it weren't for the password issue.
> I've got DotNet code create the reprot and render it as an Excel
> spreadsheet.
> I've got code to password-protect the spreadsheet.
> I want code to control the above code - to run at a certain time and
> then deliver it via email. But it doesn't look like the Subscriptions
> object will do this. Subscriptions appears to create the report and
> deliver it, but not allow intervention for something like password
> protection.
>|||The best solution here is to create a custom delivery extension.
--
Peter Blackburn
Windows Server Systems - SQL Server MVP
Hitchhiker's Guide to SQL Server 2000 Reporting Services
http://www.sqlreportingservices.net
"Jay" <jaytaylor_it@.hotmail.com> wrote in message
news:a737af3c.0411291503.60317abc@.posting.google.com...
>I know RS doesn't offer this now.
> I'm trying to figure out a workaround.
> I need to:
> -run a report on a schedule
> -render it to excel
> -password protect it
> -email it
> Subscriptions would be fine if it weren't for the password issue.
> I've got DotNet code create the reprot and render it as an Excel
> spreadsheet.
> I've got code to password-protect the spreadsheet.
> I want code to control the above code - to run at a certain time and
> then deliver it via email. But it doesn't look like the Subscriptions
> object will do this. Subscriptions appears to create the report and
> deliver it, but not allow intervention for something like password
> protection.|||Thanks. This looks like the way to go. I think I"ll have to go outside RS. I
don't think a delivery extension can handle this.
"Charles Kangai" wrote:
> My suggestion is that you use a script outside of Reporting Services to send
> the mail. You can use CDO or .NET web mail. YOu can then schedule this using
> Windows scheduler.
> Try using the following code in a VB Console Application (you need to add a
> reference of System.Web.dll to your project):
> Imports System.Web.Mail
> Module Module1
> Dim oMail As MailMessage = New MailMessage
> Sub Main()
> oMail.From = "user@.mydomain.com"
> oMail.To = "administrator@.classroom.com"
> oMail.Subject = "Sending Using Web Mail"
> oMail.BodyFormat = MailFormat.Text
> oMail.Body = "Password protected file."
> Dim myfile As String = "c:\Myfile.xls"
> Dim oAttachment As MailAttachment = New MailAttachment(myfile)
> oMail.Attachments.Add(oAttachment)
> SmtpMail.SmtpServer = "10.1.1.200"
> SmtpMail.Send(oMail)
> oMail = Nothing
> oAttachment = Nothing
> End Sub
> End Module
>
> HTH
> Charles Kangai, MCT, MCDBA
>
> "Jay" wrote:
> > I know RS doesn't offer this now.
> >
> > I'm trying to figure out a workaround.
> >
> > I need to:
> >
> > -run a report on a schedule
> > -render it to excel
> > -password protect it
> > -email it
> >
> > Subscriptions would be fine if it weren't for the password issue.
> >
> > I've got DotNet code create the reprot and render it as an Excel
> > spreadsheet.
> > I've got code to password-protect the spreadsheet.
> >
> > I want code to control the above code - to run at a certain time and
> > then deliver it via email. But it doesn't look like the Subscriptions
> > object will do this. Subscriptions appears to create the report and
> > deliver it, but not allow intervention for something like password
> > protection.
> >|||Thanks. I don't get it, though - it looks like whatever custom delivery
extension I'd create, I'd still need to use RS's CreateSubscription method.
How woud I be able to insert password protection into the process when the
subscription kicks off?
"Peter Blackburn (www.sqlreportingservice" wrote:
> The best solution here is to create a custom delivery extension.
> --
> Peter Blackburn
> Windows Server Systems - SQL Server MVP
> Hitchhiker's Guide to SQL Server 2000 Reporting Services
> http://www.sqlreportingservices.net
>
> "Jay" <jaytaylor_it@.hotmail.com> wrote in message
> news:a737af3c.0411291503.60317abc@.posting.google.com...
> >I know RS doesn't offer this now.
> >
> > I'm trying to figure out a workaround.
> >
> > I need to:
> >
> > -run a report on a schedule
> > -render it to excel
> > -password protect it
> > -email it
> >
> > Subscriptions would be fine if it weren't for the password issue.
> >
> > I've got DotNet code create the reprot and render it as an Excel
> > spreadsheet.
> > I've got code to password-protect the spreadsheet.
> >
> > I want code to control the above code - to run at a certain time and
> > then deliver it via email. But it doesn't look like the Subscriptions
> > object will do this. Subscriptions appears to create the report and
> > deliver it, but not allow intervention for something like password
> > protection.
>
>
I'm trying to figure out a workaround.
I need to:
-run a report on a schedule
-render it to excel
-password protect it
-email it
Subscriptions would be fine if it weren't for the password issue.
I've got DotNet code create the reprot and render it as an Excel
spreadsheet.
I've got code to password-protect the spreadsheet.
I want code to control the above code - to run at a certain time and
then deliver it via email. But it doesn't look like the Subscriptions
object will do this. Subscriptions appears to create the report and
deliver it, but not allow intervention for something like password
protection.My suggestion is that you use a script outside of Reporting Services to send
the mail. You can use CDO or .NET web mail. YOu can then schedule this using
Windows scheduler.
Try using the following code in a VB Console Application (you need to add a
reference of System.Web.dll to your project):
Imports System.Web.Mail
Module Module1
Dim oMail As MailMessage = New MailMessage
Sub Main()
oMail.From = "user@.mydomain.com"
oMail.To = "administrator@.classroom.com"
oMail.Subject = "Sending Using Web Mail"
oMail.BodyFormat = MailFormat.Text
oMail.Body = "Password protected file."
Dim myfile As String = "c:\Myfile.xls"
Dim oAttachment As MailAttachment = New MailAttachment(myfile)
oMail.Attachments.Add(oAttachment)
SmtpMail.SmtpServer = "10.1.1.200"
SmtpMail.Send(oMail)
oMail = Nothing
oAttachment = Nothing
End Sub
End Module
HTH
Charles Kangai, MCT, MCDBA
"Jay" wrote:
> I know RS doesn't offer this now.
> I'm trying to figure out a workaround.
> I need to:
> -run a report on a schedule
> -render it to excel
> -password protect it
> -email it
> Subscriptions would be fine if it weren't for the password issue.
> I've got DotNet code create the reprot and render it as an Excel
> spreadsheet.
> I've got code to password-protect the spreadsheet.
> I want code to control the above code - to run at a certain time and
> then deliver it via email. But it doesn't look like the Subscriptions
> object will do this. Subscriptions appears to create the report and
> deliver it, but not allow intervention for something like password
> protection.
>|||The best solution here is to create a custom delivery extension.
--
Peter Blackburn
Windows Server Systems - SQL Server MVP
Hitchhiker's Guide to SQL Server 2000 Reporting Services
http://www.sqlreportingservices.net
"Jay" <jaytaylor_it@.hotmail.com> wrote in message
news:a737af3c.0411291503.60317abc@.posting.google.com...
>I know RS doesn't offer this now.
> I'm trying to figure out a workaround.
> I need to:
> -run a report on a schedule
> -render it to excel
> -password protect it
> -email it
> Subscriptions would be fine if it weren't for the password issue.
> I've got DotNet code create the reprot and render it as an Excel
> spreadsheet.
> I've got code to password-protect the spreadsheet.
> I want code to control the above code - to run at a certain time and
> then deliver it via email. But it doesn't look like the Subscriptions
> object will do this. Subscriptions appears to create the report and
> deliver it, but not allow intervention for something like password
> protection.|||Thanks. This looks like the way to go. I think I"ll have to go outside RS. I
don't think a delivery extension can handle this.
"Charles Kangai" wrote:
> My suggestion is that you use a script outside of Reporting Services to send
> the mail. You can use CDO or .NET web mail. YOu can then schedule this using
> Windows scheduler.
> Try using the following code in a VB Console Application (you need to add a
> reference of System.Web.dll to your project):
> Imports System.Web.Mail
> Module Module1
> Dim oMail As MailMessage = New MailMessage
> Sub Main()
> oMail.From = "user@.mydomain.com"
> oMail.To = "administrator@.classroom.com"
> oMail.Subject = "Sending Using Web Mail"
> oMail.BodyFormat = MailFormat.Text
> oMail.Body = "Password protected file."
> Dim myfile As String = "c:\Myfile.xls"
> Dim oAttachment As MailAttachment = New MailAttachment(myfile)
> oMail.Attachments.Add(oAttachment)
> SmtpMail.SmtpServer = "10.1.1.200"
> SmtpMail.Send(oMail)
> oMail = Nothing
> oAttachment = Nothing
> End Sub
> End Module
>
> HTH
> Charles Kangai, MCT, MCDBA
>
> "Jay" wrote:
> > I know RS doesn't offer this now.
> >
> > I'm trying to figure out a workaround.
> >
> > I need to:
> >
> > -run a report on a schedule
> > -render it to excel
> > -password protect it
> > -email it
> >
> > Subscriptions would be fine if it weren't for the password issue.
> >
> > I've got DotNet code create the reprot and render it as an Excel
> > spreadsheet.
> > I've got code to password-protect the spreadsheet.
> >
> > I want code to control the above code - to run at a certain time and
> > then deliver it via email. But it doesn't look like the Subscriptions
> > object will do this. Subscriptions appears to create the report and
> > deliver it, but not allow intervention for something like password
> > protection.
> >|||Thanks. I don't get it, though - it looks like whatever custom delivery
extension I'd create, I'd still need to use RS's CreateSubscription method.
How woud I be able to insert password protection into the process when the
subscription kicks off?
"Peter Blackburn (www.sqlreportingservice" wrote:
> The best solution here is to create a custom delivery extension.
> --
> Peter Blackburn
> Windows Server Systems - SQL Server MVP
> Hitchhiker's Guide to SQL Server 2000 Reporting Services
> http://www.sqlreportingservices.net
>
> "Jay" <jaytaylor_it@.hotmail.com> wrote in message
> news:a737af3c.0411291503.60317abc@.posting.google.com...
> >I know RS doesn't offer this now.
> >
> > I'm trying to figure out a workaround.
> >
> > I need to:
> >
> > -run a report on a schedule
> > -render it to excel
> > -password protect it
> > -email it
> >
> > Subscriptions would be fine if it weren't for the password issue.
> >
> > I've got DotNet code create the reprot and render it as an Excel
> > spreadsheet.
> > I've got code to password-protect the spreadsheet.
> >
> > I want code to control the above code - to run at a certain time and
> > then deliver it via email. But it doesn't look like the Subscriptions
> > object will do this. Subscriptions appears to create the report and
> > deliver it, but not allow intervention for something like password
> > protection.
>
>
Subscribe to:
Posts (Atom)