Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Monday, March 26, 2012

problem with inserting or updating dates in mssql 2000

Hello.I've read many topics about this problem but i couldn't figure it out.
I use form where user must insert 2 dates using texboxes.-One is required and other is optional.
Sql 2000 is inserting either '20061105' or '2006.11.05' on insert update but select query returns 05.11.2006 on my report.
Question 1.How do I insert or update dates from my form where date is entered dd.mm.yyyy to sql 2000 table?
question 2. What to do if user left optional texbox date empty.

I'm using SP and function with arguments (byval texbox1.text as date, byval texbox2.text as date)
and parameters @.date1, sqldbtype date =texbox1.textYou can get the date as;

DateTime myDate = DateTime.ParseExact(txtDate.Text, "dd.M.yyyy", System.Globalization.CultureInfo.InvariantCulture);

Now that you have your text box's date as a DateTime variable you can supply that to a SQL parameter query in any format you want, such as dd MMM yyyy

|||I understand that.
I wanna know how to change format of date wich is inserted as d.M.yyyy in texbox to yyyy.M.d because it is passed to sp parameter and it must be yyyy.M.d to do successful insert/update?

Tuesday, March 20, 2012

problem with formauthentication

Hi,
i am working with RS form authentication.I fallowed all the steps as in MSDN
guide.
But when i am trying to open ReportManager ,I am getting the error like.
Unable to communicate with report server. Please verify that the report
server is operational.
While i tried to open ReportServer it is saying like
Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.
I am keep on tring for 4hrs but i am not getting.
plz anybody can helpme
Thanks!Re-check the following:
Make sure you have Enterprise or Development edition of Reporting Services
(Standard edition doesn't support custom security extensions)
Make sure you are logging in with the same user name specified in the
<UserName> element in the RSReportServer.config
Make sure you correctly modified the rssrvpolicy.config as per the
instructions
Make sure you take a break before trying the above.
--
Adrian M.
MCP
"simmi" <simmi@.discussions.microsoft.com> wrote in message
news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
> Hi,
> i am working with RS form authentication.I fallowed all the steps as in
> MSDN
> guide.
> But when i am trying to open ReportManager ,I am getting the error like.
> Unable to communicate with report server. Please verify that the report
> server is operational.
> While i tried to open ReportServer it is saying like
> Security Exception
> Description: The application attempted to perform an operation not allowed
> by the security policy. To grant this application the required permission
> please contact your system administrator or change the application's trust
> level in the configuration file.
> I am keep on tring for 4hrs but i am not getting.
> plz anybody can helpme
> Thanks!
>
>
>|||Hi Adrian thanks for ur help
i did some mistakes in rssrvpolicy.config .i rectified that one but again i
am getting errors so i will try again the whole process.
Thanks!
"Adrian M." wrote:
> Re-check the following:
> Make sure you have Enterprise or Development edition of Reporting Services
> (Standard edition doesn't support custom security extensions)
> Make sure you are logging in with the same user name specified in the
> <UserName> element in the RSReportServer.config
> Make sure you correctly modified the rssrvpolicy.config as per the
> instructions
> Make sure you take a break before trying the above.
> --
> Adrian M.
> MCP
> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
> >
> > Hi,
> > i am working with RS form authentication.I fallowed all the steps as in
> > MSDN
> > guide.
> >
> > But when i am trying to open ReportManager ,I am getting the error like.
> >
> > Unable to communicate with report server. Please verify that the report
> > server is operational.
> >
> > While i tried to open ReportServer it is saying like
> >
> > Security Exception
> > Description: The application attempted to perform an operation not allowed
> > by the security policy. To grant this application the required permission
> > please contact your system administrator or change the application's trust
> > level in the configuration file.
> >
> > I am keep on tring for 4hrs but i am not getting.
> >
> > plz anybody can helpme
> >
> > Thanks!
> >
> >
> >
> >
> >
> >
>
>|||When I first set up Forms Auth, I had to go over that white paper 3 times
before I got everything just right!...
--
Adrian M.
MCP
"simmi" <simmi@.discussions.microsoft.com> wrote in message
news:F8336A93-6389-4061-8FCC-03EA5F9B2836@.microsoft.com...
> Hi Adrian thanks for ur help
> i did some mistakes in rssrvpolicy.config .i rectified that one but again
> i
> am getting errors so i will try again the whole process.
> Thanks!
> "Adrian M." wrote:
>> Re-check the following:
>> Make sure you have Enterprise or Development edition of Reporting
>> Services
>> (Standard edition doesn't support custom security extensions)
>> Make sure you are logging in with the same user name specified in the
>> <UserName> element in the RSReportServer.config
>> Make sure you correctly modified the rssrvpolicy.config as per the
>> instructions
>> Make sure you take a break before trying the above.
>> --
>> Adrian M.
>> MCP
>> "simmi" <simmi@.discussions.microsoft.com> wrote in message
>> news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
>> >
>> > Hi,
>> > i am working with RS form authentication.I fallowed all the steps as in
>> > MSDN
>> > guide.
>> >
>> > But when i am trying to open ReportManager ,I am getting the error
>> > like.
>> >
>> > Unable to communicate with report server. Please verify that the
>> > report
>> > server is operational.
>> >
>> > While i tried to open ReportServer it is saying like
>> >
>> > Security Exception
>> > Description: The application attempted to perform an operation not
>> > allowed
>> > by the security policy. To grant this application the required
>> > permission
>> > please contact your system administrator or change the application's
>> > trust
>> > level in the configuration file.
>> >
>> > I am keep on tring for 4hrs but i am not getting.
>> >
>> > plz anybody can helpme
>> >
>> > Thanks!
>> >
>> >
>> >
>> >
>> >
>> >
>>|||Hi now i succeeded in just getting of ReportManager,ReportServer browsers.
Now problem r
1)After i registerd name and password i can't able to logon into
reportmanager.
I am getting error like
" The request failed with HTTP status 401: Access Denied. "
2)I am loging on to reportserver but i can't view the reports .
Here error is like
The encrypted value for configuration setting
UnattendedExecutionAccount\UserName cannot be decrypted.
(rsFailedToDecryptConfigInformation) Get Online Help
Invalid length for a Base-64 char array.
Now where i made mistake.
if u know plz help me
Thanks!
simmi
"Adrian M." wrote:
> When I first set up Forms Auth, I had to go over that white paper 3 times
> before I got everything just right!...
> --
> Adrian M.
> MCP
> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> news:F8336A93-6389-4061-8FCC-03EA5F9B2836@.microsoft.com...
> > Hi Adrian thanks for ur help
> > i did some mistakes in rssrvpolicy.config .i rectified that one but again
> > i
> > am getting errors so i will try again the whole process.
> > Thanks!
> >
> > "Adrian M." wrote:
> >
> >> Re-check the following:
> >>
> >> Make sure you have Enterprise or Development edition of Reporting
> >> Services
> >> (Standard edition doesn't support custom security extensions)
> >> Make sure you are logging in with the same user name specified in the
> >> <UserName> element in the RSReportServer.config
> >> Make sure you correctly modified the rssrvpolicy.config as per the
> >> instructions
> >>
> >> Make sure you take a break before trying the above.
> >> --
> >> Adrian M.
> >> MCP
> >>
> >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> >> news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
> >> >
> >> > Hi,
> >> > i am working with RS form authentication.I fallowed all the steps as in
> >> > MSDN
> >> > guide.
> >> >
> >> > But when i am trying to open ReportManager ,I am getting the error
> >> > like.
> >> >
> >> > Unable to communicate with report server. Please verify that the
> >> > report
> >> > server is operational.
> >> >
> >> > While i tried to open ReportServer it is saying like
> >> >
> >> > Security Exception
> >> > Description: The application attempted to perform an operation not
> >> > allowed
> >> > by the security policy. To grant this application the required
> >> > permission
> >> > please contact your system administrator or change the application's
> >> > trust
> >> > level in the configuration file.
> >> >
> >> > I am keep on tring for 4hrs but i am not getting.
> >> >
> >> > plz anybody can helpme
> >> >
> >> > Thanks!
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >>
>
>|||See if the following helps you:
http://prologika.com/blog/archive/2004/12/31/197.aspx
--
Adrian M.
MCP
"simmi" <simmi@.discussions.microsoft.com> wrote in message
news:924F7BD2-9E0D-4987-BE2B-36ACF290918B@.microsoft.com...
> Hi now i succeeded in just getting of ReportManager,ReportServer browsers.
> Now problem r
> 1)After i registerd name and password i can't able to logon into
> reportmanager.
> I am getting error like
> " The request failed with HTTP status 401: Access Denied. "
> 2)I am loging on to reportserver but i can't view the reports .
> Here error is like
> The encrypted value for configuration setting
> UnattendedExecutionAccount\UserName cannot be decrypted.
> (rsFailedToDecryptConfigInformation) Get Online Help
> Invalid length for a Base-64 char array.
> Now where i made mistake.
> if u know plz help me
>
> Thanks!
> simmi
>
>
> "Adrian M." wrote:
>> When I first set up Forms Auth, I had to go over that white paper 3 times
>> before I got everything just right!...
>> --
>> Adrian M.
>> MCP
>> "simmi" <simmi@.discussions.microsoft.com> wrote in message
>> news:F8336A93-6389-4061-8FCC-03EA5F9B2836@.microsoft.com...
>> > Hi Adrian thanks for ur help
>> > i did some mistakes in rssrvpolicy.config .i rectified that one but
>> > again
>> > i
>> > am getting errors so i will try again the whole process.
>> > Thanks!
>> >
>> > "Adrian M." wrote:
>> >
>> >> Re-check the following:
>> >>
>> >> Make sure you have Enterprise or Development edition of Reporting
>> >> Services
>> >> (Standard edition doesn't support custom security extensions)
>> >> Make sure you are logging in with the same user name specified in the
>> >> <UserName> element in the RSReportServer.config
>> >> Make sure you correctly modified the rssrvpolicy.config as per the
>> >> instructions
>> >>
>> >> Make sure you take a break before trying the above.
>> >> --
>> >> Adrian M.
>> >> MCP
>> >>
>> >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
>> >> news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
>> >> >
>> >> > Hi,
>> >> > i am working with RS form authentication.I fallowed all the steps as
>> >> > in
>> >> > MSDN
>> >> > guide.
>> >> >
>> >> > But when i am trying to open ReportManager ,I am getting the error
>> >> > like.
>> >> >
>> >> > Unable to communicate with report server. Please verify that the
>> >> > report
>> >> > server is operational.
>> >> >
>> >> > While i tried to open ReportServer it is saying like
>> >> >
>> >> > Security Exception
>> >> > Description: The application attempted to perform an operation not
>> >> > allowed
>> >> > by the security policy. To grant this application the required
>> >> > permission
>> >> > please contact your system administrator or change the application's
>> >> > trust
>> >> > level in the configuration file.
>> >> >
>> >> > I am keep on tring for 4hrs but i am not getting.
>> >> >
>> >> > plz anybody can helpme
>> >> >
>> >> > Thanks!
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>|||Hi Adrian ,
thanks for ur help.
i will try this problem today.
Thanks!
"Adrian M." wrote:
> See if the following helps you:
> http://prologika.com/blog/archive/2004/12/31/197.aspx
> --
> Adrian M.
> MCP
> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> news:924F7BD2-9E0D-4987-BE2B-36ACF290918B@.microsoft.com...
> > Hi now i succeeded in just getting of ReportManager,ReportServer browsers.
> > Now problem r
> >
> > 1)After i registerd name and password i can't able to logon into
> > reportmanager.
> >
> > I am getting error like
> >
> > " The request failed with HTTP status 401: Access Denied. "
> >
> > 2)I am loging on to reportserver but i can't view the reports .
> >
> > Here error is like
> >
> > The encrypted value for configuration setting
> > UnattendedExecutionAccount\UserName cannot be decrypted.
> > (rsFailedToDecryptConfigInformation) Get Online Help
> > Invalid length for a Base-64 char array.
> >
> > Now where i made mistake.
> >
> > if u know plz help me
> >
> >
> > Thanks!
> > simmi
> >
> >
> >
> >
> > "Adrian M." wrote:
> >
> >> When I first set up Forms Auth, I had to go over that white paper 3 times
> >> before I got everything just right!...
> >>
> >> --
> >> Adrian M.
> >> MCP
> >>
> >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> >> news:F8336A93-6389-4061-8FCC-03EA5F9B2836@.microsoft.com...
> >> > Hi Adrian thanks for ur help
> >> > i did some mistakes in rssrvpolicy.config .i rectified that one but
> >> > again
> >> > i
> >> > am getting errors so i will try again the whole process.
> >> > Thanks!
> >> >
> >> > "Adrian M." wrote:
> >> >
> >> >> Re-check the following:
> >> >>
> >> >> Make sure you have Enterprise or Development edition of Reporting
> >> >> Services
> >> >> (Standard edition doesn't support custom security extensions)
> >> >> Make sure you are logging in with the same user name specified in the
> >> >> <UserName> element in the RSReportServer.config
> >> >> Make sure you correctly modified the rssrvpolicy.config as per the
> >> >> instructions
> >> >>
> >> >> Make sure you take a break before trying the above.
> >> >> --
> >> >> Adrian M.
> >> >> MCP
> >> >>
> >> >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> >> >> news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
> >> >> >
> >> >> > Hi,
> >> >> > i am working with RS form authentication.I fallowed all the steps as
> >> >> > in
> >> >> > MSDN
> >> >> > guide.
> >> >> >
> >> >> > But when i am trying to open ReportManager ,I am getting the error
> >> >> > like.
> >> >> >
> >> >> > Unable to communicate with report server. Please verify that the
> >> >> > report
> >> >> > server is operational.
> >> >> >
> >> >> > While i tried to open ReportServer it is saying like
> >> >> >
> >> >> > Security Exception
> >> >> > Description: The application attempted to perform an operation not
> >> >> > allowed
> >> >> > by the security policy. To grant this application the required
> >> >> > permission
> >> >> > please contact your system administrator or change the application's
> >> >> > trust
> >> >> > level in the configuration file.
> >> >> >
> >> >> > I am keep on tring for 4hrs but i am not getting.
> >> >> >
> >> >> > plz anybody can helpme
> >> >> >
> >> >> > Thanks!
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||Hi,
i am again getting the problem while oppenning the reportmanager like
"The request failed with HTTP status 401: Access Denied. "
Reportserver browser is working correctly
so can u help me
Thanks
"Adrian M." wrote:
> See if the following helps you:
> http://prologika.com/blog/archive/2004/12/31/197.aspx
> --
> Adrian M.
> MCP
> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> news:924F7BD2-9E0D-4987-BE2B-36ACF290918B@.microsoft.com...
> > Hi now i succeeded in just getting of ReportManager,ReportServer browsers.
> > Now problem r
> >
> > 1)After i registerd name and password i can't able to logon into
> > reportmanager.
> >
> > I am getting error like
> >
> > " The request failed with HTTP status 401: Access Denied. "
> >
> > 2)I am loging on to reportserver but i can't view the reports .
> >
> > Here error is like
> >
> > The encrypted value for configuration setting
> > UnattendedExecutionAccount\UserName cannot be decrypted.
> > (rsFailedToDecryptConfigInformation) Get Online Help
> > Invalid length for a Base-64 char array.
> >
> > Now where i made mistake.
> >
> > if u know plz help me
> >
> >
> > Thanks!
> > simmi
> >
> >
> >
> >
> > "Adrian M." wrote:
> >
> >> When I first set up Forms Auth, I had to go over that white paper 3 times
> >> before I got everything just right!...
> >>
> >> --
> >> Adrian M.
> >> MCP
> >>
> >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> >> news:F8336A93-6389-4061-8FCC-03EA5F9B2836@.microsoft.com...
> >> > Hi Adrian thanks for ur help
> >> > i did some mistakes in rssrvpolicy.config .i rectified that one but
> >> > again
> >> > i
> >> > am getting errors so i will try again the whole process.
> >> > Thanks!
> >> >
> >> > "Adrian M." wrote:
> >> >
> >> >> Re-check the following:
> >> >>
> >> >> Make sure you have Enterprise or Development edition of Reporting
> >> >> Services
> >> >> (Standard edition doesn't support custom security extensions)
> >> >> Make sure you are logging in with the same user name specified in the
> >> >> <UserName> element in the RSReportServer.config
> >> >> Make sure you correctly modified the rssrvpolicy.config as per the
> >> >> instructions
> >> >>
> >> >> Make sure you take a break before trying the above.
> >> >> --
> >> >> Adrian M.
> >> >> MCP
> >> >>
> >> >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> >> >> news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
> >> >> >
> >> >> > Hi,
> >> >> > i am working with RS form authentication.I fallowed all the steps as
> >> >> > in
> >> >> > MSDN
> >> >> > guide.
> >> >> >
> >> >> > But when i am trying to open ReportManager ,I am getting the error
> >> >> > like.
> >> >> >
> >> >> > Unable to communicate with report server. Please verify that the
> >> >> > report
> >> >> > server is operational.
> >> >> >
> >> >> > While i tried to open ReportServer it is saying like
> >> >> >
> >> >> > Security Exception
> >> >> > Description: The application attempted to perform an operation not
> >> >> > allowed
> >> >> > by the security policy. To grant this application the required
> >> >> > permission
> >> >> > please contact your system administrator or change the application's
> >> >> > trust
> >> >> > level in the configuration file.
> >> >> >
> >> >> > I am keep on tring for 4hrs but i am not getting.
> >> >> >
> >> >> > plz anybody can helpme
> >> >> >
> >> >> > Thanks!
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||I have the same problem, has anyone found a solution? Thanks
simmi wrote:
> Hi,
> i am again getting the problem while oppenning the reportmanager like
> "The request failed with HTTP status 401: Access Denied. "
> Reportserver browser is working correctly
> so can u help me
> Thanks
>
> "Adrian M." wrote:
> > See if the following helps you:
> > http://prologika.com/blog/archive/2004/12/31/197.aspx
> >
> > --
> > Adrian M.
> > MCP
> >
> > "simmi" <simmi@.discussions.microsoft.com> wrote in message
> > news:924F7BD2-9E0D-4987-BE2B-36ACF290918B@.microsoft.com...
> > > Hi now i succeeded in just getting of ReportManager,ReportServer
browsers.
> > > Now problem r
> > >
> > > 1)After i registerd name and password i can't able to logon into
> > > reportmanager.
> > >
> > > I am getting error like
> > >
> > > " The request failed with HTTP status 401: Access Denied. "
> > >
> > > 2)I am loging on to reportserver but i can't view the reports .
> > >
> > > Here error is like
> > >
> > > The encrypted value for configuration setting
> > > UnattendedExecutionAccount\UserName cannot be decrypted.
> > > (rsFailedToDecryptConfigInformation) Get Online Help
> > > Invalid length for a Base-64 char array.
> > >
> > > Now where i made mistake.
> > >
> > > if u know plz help me
> > >
> > >
> > > Thanks!
> > > simmi
> > >
> > >
> > >
> > >
> > > "Adrian M." wrote:
> > >
> > >> When I first set up Forms Auth, I had to go over that white
paper 3 times
> > >> before I got everything just right!...
> > >>
> > >> --
> > >> Adrian M.
> > >> MCP
> > >>
> > >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> > >> news:F8336A93-6389-4061-8FCC-03EA5F9B2836@.microsoft.com...
> > >> > Hi Adrian thanks for ur help
> > >> > i did some mistakes in rssrvpolicy.config .i rectified that
one but
> > >> > again
> > >> > i
> > >> > am getting errors so i will try again the whole process.
> > >> > Thanks!
> > >> >
> > >> > "Adrian M." wrote:
> > >> >
> > >> >> Re-check the following:
> > >> >>
> > >> >> Make sure you have Enterprise or Development edition of
Reporting
> > >> >> Services
> > >> >> (Standard edition doesn't support custom security extensions)
> > >> >> Make sure you are logging in with the same user name
specified in the
> > >> >> <UserName> element in the RSReportServer.config
> > >> >> Make sure you correctly modified the rssrvpolicy.config as
per the
> > >> >> instructions
> > >> >>
> > >> >> Make sure you take a break before trying the above.
> > >> >> --
> > >> >> Adrian M.
> > >> >> MCP
> > >> >>
> > >> >> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> > >> >> news:BCCAAEF8-2C99-4856-9B77-A9455EEDFC49@.microsoft.com...
> > >> >> >
> > >> >> > Hi,
> > >> >> > i am working with RS form authentication.I fallowed all the
steps as
> > >> >> > in
> > >> >> > MSDN
> > >> >> > guide.
> > >> >> >
> > >> >> > But when i am trying to open ReportManager ,I am getting
the error
> > >> >> > like.
> > >> >> >
> > >> >> > Unable to communicate with report server. Please verify
that the
> > >> >> > report
> > >> >> > server is operational.
> > >> >> >
> > >> >> > While i tried to open ReportServer it is saying like
> > >> >> >
> > >> >> > Security Exception
> > >> >> > Description: The application attempted to perform an
operation not
> > >> >> > allowed
> > >> >> > by the security policy. To grant this application the
required
> > >> >> > permission
> > >> >> > please contact your system administrator or change the
application's
> > >> >> > trust
> > >> >> > level in the configuration file.
> > >> >> >
> > >> >> > I am keep on tring for 4hrs but i am not getting.
> > >> >> >
> > >> >> > plz anybody can helpme
> > >> >> >
> > >> >> > Thanks!
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >>
> > >>
> > >>
> >
> >
> >

Problem with Form Authentication Example

I installed the Microsoft Forms Authentication in Report Services example in
a VPC running Windows 2003, Active Directory, SQl Server Enterprise and SQL
Reporting Servcie Enterprise Edition.
I registered user "john" and modified RSReportServer.config and added and
changed the value for <UserName> tag to be "john".
Stepping through the debugger the demo fails on GetWebResponse because
cookie is null.
I have tried FQDN in RSWebApplication.config but problem persist.
Any idea what is going wrong causing GetWebResponse to fail?I'm using a solution that's primarily based on the Forms Auth sample and I
can say that it does work. Double-check your web.config modifications for
the ReportServer and ReportManager webs according to the instructions in the
sample.
Adrian M.
"John Amason" <jamason@.ics-associates.com> wrote in message
news:uH%23y30Q$EHA.2580@.TK2MSFTNGP15.phx.gbl...
>I installed the Microsoft Forms Authentication in Report Services example
>in
> a VPC running Windows 2003, Active Directory, SQl Server Enterprise and
> SQL
> Reporting Servcie Enterprise Edition.
> I registered user "john" and modified RSReportServer.config and added and
> changed the value for <UserName> tag to be "john".
> Stepping through the debugger the demo fails on GetWebResponse because
> cookie is null.
> I have tried FQDN in RSWebApplication.config but problem persist.
> Any idea what is going wrong causing GetWebResponse to fail?
>

Wednesday, March 7, 2012

Problem with displaying image on the report

I have a webservice which creates an image returns that image in the form of Byte array. I want to consume this webservice and display that image on my report. When I see my report in the Preview tab of the report designer, it displays that image but when I deploy my report on the report server, image doesn't show up. I have copied app_code.dll (dll for the webservice) to the following locations:

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies
C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

Here is the code for the webservice:

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Drawing
Imports System.Diagnostics
Imports System.IO

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

Public Class Service
Inherits System.Web.Services.WebService

<WebMethod()> _

Public Function HelloWorld() As Byte()

Dim marker As New Bitmap("C:\Inetpub\wwwroot\help.gif")
Dim imageStream As New System.IO.MemoryStream
marker.Save(imageStream, System.Drawing.Imaging.ImageFormat.Jpeg)
Trace.Write("Before Write")
Return imageStream.ToArray()

End Function

End Class

I have referenced this dll saved in public assemblies folder from my report project and wrote a function to call the above mentioned webservice function HelloWorld() and called the function from value property of an image control on the report.

Does anybody has any idea what am I missing?

Thanks

Its probably an authentication problem. Try configuring an Unattended Execution Account for SRS to an account which has permission to access the web service on the remote machine. Also check the IIS logs on the machine serving the image for failed login attempts.

Monday, February 20, 2012

Problem with dates

I am having a problem inserting dates into SQL server 2000. I have an aspx page which contains a simple form.

This form data is inserted into the database on submission. On submission to SQL Server the date field is changed to 01/01/1900

This is the concatenated INSERT statement which is generated:

INSERT INTO Applicant (appTitle, appFname, appSname, appDOB, appEmail, appTel, appTelB, appAdd1, appAdd2, appAdd3, appAdd4, appPostcode, appPassword) VALUES ('Mr', 'John', 'Smith', 01/04/78, 'j.smith@.hello.com', '01258 698523', '', '1 The Smithy', 'Old Town', 'Oldville', '', 'OS6 8IU', 'Smith3969')

I have tried wrapping the date in ' ', but this doesn't work either.

Any help would be greatly appreciated

ThanksIt will not work without the quotes. Absent that, you are inserting 1/4 (0.25) /78 (a really small number).

I woulduse parameters instead, which isolates you from the strangeness with handling dates otherwise.|||Thank you for this.

I have almost got it working now using parameters. However I have noticed that dates submitted in the format DD/MM/YYYY or DD/MM/YY are being flipped in SQL Server to the incorrect format MM/DD/YYYY.

This is creating incorrect dates and in some cases is generating the following error:
"Arithmetic overflow error converting expression to data type datetime. The statement has been terminated."

Any ideas?|||Inside SQL Server, the dates (if DateTime type) are binary types, without any formatting applied to them. You can explicitly format the datetime retrieved from SQL Server to a useful representation using DateTime.ToString() (one of the overloads allows a format string that specifies the display format).|||Thats ok, so I can format them correctly in my application.

But what is causing the error:
"Arithmetic overflow error converting expression to data type datetime. The statement has been terminated."

It only occurs on some dates and not on others. This is really confusing me. I may have to resort to storing the dates as text, and then perform any calculations I require by changing them back to dates in my application.

If you have some ideas on this they would be greatfully received.

Thanks

Charlie|||You are likely sending a date to SQL Server (as a string) in a format it does not expect (DD/MM/YYYY rather than MM/DD/YYYY).

Show the code around when the error is occuring. On SQL Server, I would use SQL Profiler and see what is being sent to SQL Server.