Wednesday, March 28, 2012
PDF Rendering with web form
and display it as a PDF.
The problem that is experienced is when the report reads parameters from the
querystring passed to the webform. The parameters passed to the page will
then be passed to the Reporting Services web service. The page attempts to
open the PDF, but when Adobe Acrobat Reader opens, an error appears: "Adobe
Reader could not open 'paXXXXXX.fdf' because it is either not a supported
file type or because the file has been corrupted (for example, it was sent as
an email attachment and wasn't correctly decoded)."
This problem only happens when exporting to the PDF format and runs fine in
all other formats. This error only occurs when the report is run in version
6 of Acrobat. In version 7 it is not a problem. The instance of Reporting
Services used has SP1 installed.I had a similar problem. It turned out that the web form was adding its HTML
to the end of the PDF file. Apparently Excel didn't care but Acrobat V6 did.
I fixed it by overriding the page's Render method and only called
MyBase.Render(output) when the mime type was HTML. This prevented the page's
HTML being rendered and stuck on the end of the PDF or any other non-html
stream.
Hope that helps.
Grahame
"Aidan" wrote:
> I'm experiencing a problem with a webform which receives a binary steam back
> and display it as a PDF.
> The problem that is experienced is when the report reads parameters from the
> querystring passed to the webform. The parameters passed to the page will
> then be passed to the Reporting Services web service. The page attempts to
> open the PDF, but when Adobe Acrobat Reader opens, an error appears: "Adobe
> Reader could not open 'paXXXXXX.fdf' because it is either not a supported
> file type or because the file has been corrupted (for example, it was sent as
> an email attachment and wasn't correctly decoded)."
> This problem only happens when exporting to the PDF format and runs fine in
> all other formats. This error only occurs when the report is run in version
> 6 of Acrobat. In version 7 it is not a problem. The instance of Reporting
> Services used has SP1 installed.
PDF Printing example
service?
The one in the documentation does not stream the file back to the browser.
Thanks in advance.this is just a snippet, i'm assuming you already have the basics of using the
web service and getting a report, but just need to know the pdf portion:
report =rs.Render(reportPath,format,historyID,devInfo,parameters,credentials,showHideToggle,out
encoding, out mimeType, out optionalParams, out optionalWarnings, out
streamIDs);
Response.ClearContent();
Response.AppendHeader("content-length", report.Length.ToString());
Response.ContentType = "application/pdf";
Response.BinaryWrite(report);
Response.Flush();
Response.Close();
"RichieRich" wrote:
> Does anyone have a good example of printing to a PDF file using the web
> service?
> The one in the documentation does not stream the file back to the browser.
> Thanks in advance.|||Thanks much. The last time I tried the code from the documentation, I got a
401 error...Authorization required. Do I need to give write rpermissions on
a folder? And which user gets it.
Thanks again.
"mike" wrote:
> this is just a snippet, i'm assuming you already have the basics of using the
> web service and getting a report, but just need to know the pdf portion:
> report => rs.Render(reportPath,format,historyID,devInfo,parameters,credentials,showHideToggle,out
> encoding, out mimeType, out optionalParams, out optionalWarnings, out
> streamIDs);
> Response.ClearContent();
> Response.AppendHeader("content-length", report.Length.ToString());
> Response.ContentType = "application/pdf";
> Response.BinaryWrite(report);
> Response.Flush();
> Response.Close();
>
> "RichieRich" wrote:
> > Does anyone have a good example of printing to a PDF file using the web
> > service?
> >
> > The one in the documentation does not stream the file back to the browser.
> >
> > Thanks in advance.
Wednesday, March 21, 2012
Payroll Security
I want to use SQL 2005 as back end for payroll software.
If I want the administrator can not see the employee salary, how to use the
built in encryption feature ?
Thanks.
VensiaOne of the ways to do this would to use a trigger on the table that contains
the information. In this CLR Trigger, call the native encryption functions.
Shaun McDonnell
> Dear all,
> I want to use SQL 2005 as back end for payroll software.
> If I want the administrator can not see the employee salary, how to
> use the
> built in encryption feature ?
> Thanks.
> Vensia
>
Pause Transactional Replication
publication/subscription and then start it back up again?
Thanks,
Mark
You could stop the distribution agent and then disable it.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
sql
Wednesday, March 7, 2012
Password for replication
I need to bring the back to the way it is or was. My problem is replication.
Since I am new one knows the Administrative Link password. When I try to generate script for replication for the password it uses the 'N'.
Is there a way to work around this problem? Please advise.
Thanks
LystraCan't you go into the distributor properties and set a new password?
-PatP|||But wouldn't I need to change it at 2 places?
If I do change it will it interupt anything?
Lystra|||If you are going to trash your existing server, you'll interrupt things a bit in the process. :) Changing the password will have little additional affect.
I'd take a systemic approach to your problem:
1) Declare downtime
2) Script, then remove replication completely
3) Detach all of the databases from the affected server
4) Rebuild the affected server
5) Reattach the databases to the affected server
6) Recreate replication from the script (this will reset the password to an empty string)
7) Collapse in a heap for about 16 hours or so
-PatP
Saturday, February 25, 2012
PASSWORD
it back? (Enterprise Manager or Query Analizer) please help?This is a multi-part message in MIME format.
--=_NextPart_000_0167_01C3A9CF.CEBC57C0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Unless you removed the BUILTIN\Administrators group from the sysadmin role,
you can connect as a local Windows administrator on the server and use
Windows authentication to log into SQL Server. At that time, you can reset
the sa password.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"matta25" <matta125work@.hotmail.com> wrote in message
news:#1wbjkfqDHA.2820@.TK2MSFTNGP10.phx.gbl...
I forgot my "sa" password for SQL2000. Is there some place to look to get
it back? (Enterprise Manager or Query Analizer) please help?
--=_NextPart_000_0167_01C3A9CF.CEBC57C0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Unless you removed the =BUILTIN\Administrators group from the sysadmin role, you can connect as a local Windows =administrator on the server and use Windows authentication to log into SQL =Server. At that time, you can reset the sa password.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"matta25"
--=_NextPart_000_0167_01C3A9CF.CEBC57C0--
Passport sign out from this forum
Just lately I have noticed that I am periodically getting signed out of this forum. When I try and sign back in I get directed to an error page saying:
We apologize, but an unknown error has occured in the forums.
This error has been logged.
I would say this has been happening for a couple of weeks now at least.
Has anyone else expereienced this?
Thanks
Jamie
Not seen the error, but I am always having to sign back in, several times a day on the same machine.Monday, February 20, 2012
Passing status back from Command line application to SQL Job
Hi,
I have created a job in SQL Server 2005 in which one of the step executes a .NET console application which is created in .NET to update some status to database before the next step. i need some help in sending some status back to sql job when i come accross any problem in the console application for ex when there is a exception i need to send some status to the job, so the job gets failed permanently. i tried few other methods of updating some temporary status database with this error information and have another intermediate step in the job to check for the status... it worked but i dont like doing it. please let me know if there is any other method to do this.
Thanks in advance
Hariharan
Are you doing anything with SSIS, or is this a SQL Server Agent question only?|||I'ts in SSIS as one of the step.|||
Hari Haran wrote:
I'ts in SSIS as one of the step.
Please provide more details then... As it reads, it sounds like it has nothing to do with SSIS.
Thanks,
Phil|||
To make the to step fail, just ensure the applicaton returns a suitable exit code. Take a closer look at the Job Step dialog and note of the "Process exit code of a successful cvommand:" option. Match this to you exist code as required. If this is the SSIS task after all, then look at the properties SuccessValue and FailTaskIfRetrnCodeIsNotSuccessValue.
You have set an exit code? If not see -
Environment.Exit Method (System)
(http://msdn2.microsoft.com/en-us/library/system.environment.exit.aspx)
Passing status back from Command line application to SQL Job
Hi,
I have created a job in SQL Server 2005 in which one of the step executes a .NET console application which is created in .NET to update some status to database before the next step. i need some help in sending some status back to sql job when i come accross any problem in the console application for ex when there is a exception i need to send some status to the job, so the job gets failed permanently. i tried few other methods of updating some temporary status database with this error information and have another intermediate step in the job to check for the status... it worked but i dont like doing it. please let me know if there is any other method to do this.
Thanks in advance
Hariharan
Are you doing anything with SSIS, or is this a SQL Server Agent question only?|||I'ts in SSIS as one of the step.|||
Hari Haran wrote:
I'ts in SSIS as one of the step.
Please provide more details then... As it reads, it sounds like it has nothing to do with SSIS.
Thanks,
Phil|||
To make the to step fail, just ensure the applicaton returns a suitable exit code. Take a closer look at the Job Step dialog and note of the "Process exit code of a successful cvommand:" option. Match this to you exist code as required. If this is the SSIS task after all, then look at the properties SuccessValue and FailTaskIfRetrnCodeIsNotSuccessValue.
You have set an exit code? If not see -
Environment.Exit Method (System)
(http://msdn2.microsoft.com/en-us/library/system.environment.exit.aspx)