Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Tuesday, March 27, 2012

Altering SQL Field value to Null (DateField)

Hi,
Can someone please help me in resolving this problem.

I am accessing an SQL server from a Web page, when I update a record I sometimes would like to replace a date with a null value. ie. Delete the date in the grid on the Web page and have it remove the date in the database.

I have looked around the web and on this forum and cannot find any information about doing this type of thing.

Someone help would be greatly appreciated.

Thanks..

Regards..

Peter Annandale.Hi Peter,

It depends on the code you're using, but you should be able to set it to DBNull.Value.

If this doesn't work, post your code and we'll try to help you sort it out.

Don|||Don,
since I posted I actually found an article posted by Moorstream in early July about the exact problem I am having. By applying the recommendations of salman_arshad it has fixed my problem.

Thanks for your quick response and assistance.

BTW I had teh right idea with the DBNULL.Value I just wasn't aplying it correctly.

Regards..

Peter Annandale

Monday, February 13, 2012

Allow authenticated access without a log on

I have reporting services set up and working, using Windows Authentication
and a web page with hyperlinks to the reports
(i.e. /Reports/Pages/Report.aspx?ItemPath=%2fReports%2MyReport).
This is on an Intranet and users who have not authenticated against the
domain get a username and password prompt (as we would expect).
I turns out that none of the users will authenticated and so they will all
get the log on prompt.
Is there any way to avoid the log in prompt ? (a simple way - I know I can
Implement my own Security Extension - but this is overkill for my needs).
I can't use anonymous access as different groups of people need to see
different reports (and be denied access to the others).
There are 4 groups and I already know which group each user is in. ( they do
a forms based sign in to a gateway application first)
Is it possible for instance to pass a username and password to a report and
have it authenticate that way ?
Someone suggested using the API:
dim lgn as new
Microsoft.SqlServer.ReportingServices2005.ReportingService2005()
lgn.LogonUser("Myusername" , "myPassword" , "" )
Is this possible ? if so how would the report then be launched ?
I don't mind hard coding a generic username and password in the asp.net code
behind for the page. ( I can set up 4 generic accounts, one for each group).
--
MartyYou should be able to do this. If the user is logged in to your PC in the
same domain as the RS server then they should not be prompted.
Anything special about the server? I.e. is it a domain controller. Is it
running sharepoint? Does it have a fixed IP address?
I ask about the fixed IP address because I saw this problem once when I had
a test server that was using DHCP.
Also, try adding your domain users and groups to a local group and then use
that local group when setting up your roles.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Marty" <smarty@.community.nospam> wrote in message
news:9B1A741B-88BB-494A-AA71-67C058D8C7D7@.microsoft.com...
>I have reporting services set up and working, using Windows Authentication
> and a web page with hyperlinks to the reports
> (i.e. /Reports/Pages/Report.aspx?ItemPath=%2fReports%2MyReport).
> This is on an Intranet and users who have not authenticated against the
> domain get a username and password prompt (as we would expect).
> I turns out that none of the users will authenticated and so they will all
> get the log on prompt.
> Is there any way to avoid the log in prompt ? (a simple way - I know I can
> Implement my own Security Extension - but this is overkill for my needs).
> I can't use anonymous access as different groups of people need to see
> different reports (and be denied access to the others).
> There are 4 groups and I already know which group each user is in. ( they
> do
> a forms based sign in to a gateway application first)
> Is it possible for instance to pass a username and password to a report
> and
> have it authenticate that way ?
> Someone suggested using the API:
> dim lgn as new
> Microsoft.SqlServer.ReportingServices2005.ReportingService2005()
> lgn.LogonUser("Myusername" , "myPassword" , "" )
> Is this possible ? if so how would the report then be launched ?
> I don't mind hard coding a generic username and password in the asp.net
> code
> behind for the page. ( I can set up 4 generic accounts, one for each
> group).
> --
> Marty|||"Also, try adding your domain users and groups to a local group and then use
that local group when setting up your roles."
Ah but my issue is that the users have not logged in to the domain when they
use my application. If I get them to log in to the domain first (as a test)
it all works seamlessley, with no prompts. However this is not how they
normally work (don't ask !).|||On Jan 8, 3:13=A0am, Marty <sma...@.community.nospam> wrote:
> "Also, try adding your domain users and groups to a local group and then u=se
> that local group when setting up your roles."
> Ah but my issue is that the users have not logged in to the domain when th=ey
> use my application. If I get them to log in to the domain first (as a test=)
> it all works seamlessley, with no prompts. However this is not how they
> normally work (don't ask !).
Along the same line, is there a way to use Windows Auth to not require
the log on screen every time we open
the Reporting Services web page rpt-serv/reports? The report server
is in domain I created a local group and added
mydomain\domain users to it? Hope this did not hijack your thread
Marty :)
Bob|||Hello Smart,
Since the reporting services is designed for the windows auth, you may need
to specify the domain account and password to log on to the domain.
So it will prompt the dialog.
Sincerely yours,
Wei Lu
Microsoft Online Partner Support
=====================================================
PLEASE NOTE: The partner managed newsgroups are provided to assist with
break/fix
issues and simple how to questions.
We also love to hear your product feedback!
Let us know what you think by posting
- from the web interface: Partner Feedback
- from your newsreader: microsoft.private.directaccess.partnerfeedback.
We look forward to hearing from you!
======================================================When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||This makes absolutely no sense. You want them to be authenticated in RS
without logging in BUT they haven't logged in period. Then how would any
system in the world know who they are?
Sorry, this is just plain silly. If you aren't logged into a domain then you
aren't logged in and you are not authenticated and there is no way to be
authenticated without logging in.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Marty" <smarty@.community.nospam> wrote in message
news:ABBE4EB2-43DE-424F-9655-32D3FF57559D@.microsoft.com...
> "Also, try adding your domain users and groups to a local group and then
> use
> that local group when setting up your roles."
> Ah but my issue is that the users have not logged in to the domain when
> they
> use my application. If I get them to log in to the domain first (as a
> test)
> it all works seamlessley, with no prompts. However this is not how they
> normally work (don't ask !).
>

Allow access to IUSR_MachineName

In SQL 2000 SP3.
I was trying to follow this page:
http://support.microsoft.com/default.aspx?kbid=3D299987
It's not that I cannot follow it but that I'd prefer to have the accound = that will access the database be IUSR_MachineName. So I gave = IUSR_MachineName the ability to logon on to this database in SQL 2000 = and no other.
I get to the point in the article where it has this for the connection = string:
StrConnect =3D "Provider=3DSQLOLEDB.1;User = ID=3DIUSR_MachineName;Password=3D<strong password>;Initial = Catalog=3Dhesterlogin;" & _
"Network Library=3Ddbmssocn;Data Source=3DMyServer"
and now I am stuck. What do I assign for the password here? The = IUSR_MachineName password is automatically generated by my Internet = Informaion Services and I really do not know how to access it. All = attempts I have made in the past have been well less then satisfatory. = I suppose I could try it again (requires some Windows Scripting) but I'm = hoping there is a better or easier way. Any suggestions? Thanks.
-- George Hester
__________________________________George,
If I understand your question, you need to specify in the connection string
that you want to do a Windows login. There are examples of connection
strings at www.connectionstrings.com.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"George Hester" <hesterloli@.hotmail.com> wrote in message
news:ece5WeTwDHA.2308@.TK2MSFTNGP11.phx.gbl...
In SQL 2000 SP3.
I was trying to follow this page:
http://support.microsoft.com/default.aspx?kbid=299987
It's not that I cannot follow it but that I'd prefer to have the accound
that will access the database be IUSR_MachineName. So I gave
IUSR_MachineName the ability to logon on to this database in SQL 2000 and no
other.
I get to the point in the article where it has this for the connection
string:
StrConnect = "Provider=SQLOLEDB.1;User
ID=IUSR_MachineName;Password=<strong password>;Initial Catalog=hesterlogin;"
& _
"Network Library=dbmssocn;Data Source=MyServer"
and now I am stuck. What do I assign for the password here? The
IUSR_MachineName password is automatically generated by my Internet
Informaion Services and I really do not know how to access it. All attempts
I have made in the past have been well less then satisfatory. I suppose I
could try it again (requires some Windows Scripting) but I'm hoping there is
a better or easier way. Any suggestions? Thanks.
--
George Hester
__________________________________|||Ah maybe trusted? Let me check. Thanks.
-- George Hester
__________________________________
"Tibor Karaszi" =<tibor.please_reply_to_public_forum.karaszi@.cornerstone.se> wrote in =message news:Oy659LawDHA.1788@.tk2msftngp13.phx.gbl...
> George,
> > If I understand your question, you need to specify in the connection =string
> that you want to do a Windows login. There are examples of connection
> strings at www.connectionstrings.com.
> > -- > Tibor Karaszi, SQL Server MVP
> Archive at:
> =http://groups.google.com/groups?oi=3Ddjq&as_ugroup=3Dmicrosoft.public.sql=
server
> > > "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:ece5WeTwDHA.2308@.TK2MSFTNGP11.phx.gbl...
> In SQL 2000 SP3.
> > I was trying to follow this page:
> > http://support.microsoft.com/default.aspx?kbid=3D299987
> > It's not that I cannot follow it but that I'd prefer to have the =accound
> that will access the database be IUSR_MachineName. So I gave
> IUSR_MachineName the ability to logon on to this database in SQL 2000 =and no
> other.
> > I get to the point in the article where it has this for the connection
> string:
> > > StrConnect =3D "Provider=3DSQLOLEDB.1;User
> ID=3DIUSR_MachineName;Password=3D<strong password>;Initial =Catalog=3Dhesterlogin;"
> & _
> "Network Library=3Ddbmssocn;Data Source=3DMyServer"
> > and now I am stuck. What do I assign for the password here? The
> IUSR_MachineName password is automatically generated by my Internet
> Informaion Services and I really do not know how to access it. All =attempts
> I have made in the past have been well less then satisfatory. I =suppose I
> could try it again (requires some Windows Scripting) but I'm hoping =there is
> a better or easier way. Any suggestions? Thanks.
> > -- > George Hester
> __________________________________
> >|||Actually I was hoping to use IUSR_MachineName for the Windows Logon =account. But I see I need to put a password in for the connection =string. As my IIS controls the IUSR_MachineName password I cannot =hardcode that into the connection string. That is my issue. What do I =put in for the password so that IIS can continue to automatically =generate the IUSR_MachineName account's password and use that in my =connection string? Thanks.
-- George Hester
__________________________________
"Tibor Karaszi" =<tibor.please_reply_to_public_forum.karaszi@.cornerstone.se> wrote in =message news:Oy659LawDHA.1788@.tk2msftngp13.phx.gbl...
> George,
> > If I understand your question, you need to specify in the connection =string
> that you want to do a Windows login. There are examples of connection
> strings at www.connectionstrings.com.
> > -- > Tibor Karaszi, SQL Server MVP
> Archive at:
> =http://groups.google.com/groups?oi=3Ddjq&as_ugroup=3Dmicrosoft.public.sql=
server
> > > "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:ece5WeTwDHA.2308@.TK2MSFTNGP11.phx.gbl...
> In SQL 2000 SP3.
> > I was trying to follow this page:
> > http://support.microsoft.com/default.aspx?kbid=3D299987
> > It's not that I cannot follow it but that I'd prefer to have the =accound
> that will access the database be IUSR_MachineName. So I gave
> IUSR_MachineName the ability to logon on to this database in SQL 2000 =and no
> other.
> > I get to the point in the article where it has this for the connection
> string:
> > > StrConnect =3D "Provider=3DSQLOLEDB.1;User
> ID=3DIUSR_MachineName;Password=3D<strong password>;Initial =Catalog=3Dhesterlogin;"
> & _
> "Network Library=3Ddbmssocn;Data Source=3DMyServer"
> > and now I am stuck. What do I assign for the password here? The
> IUSR_MachineName password is automatically generated by my Internet
> Informaion Services and I really do not know how to access it. All =attempts
> I have made in the past have been well less then satisfatory. I =suppose I
> could try it again (requires some Windows Scripting) but I'm hoping =there is
> a better or easier way. Any suggestions? Thanks.
> > -- > George Hester
> __________________________________
> >

all the data coming from sql unreadable like this one (CC?E C?CI?)

all the data coming from sql unreadable like this one (C?C?E C'CI')
If you go to this page http://72.41.53.93/new_index.asp
you can see the Arabic character which is typed in the page coming
correctly.
while , on the other hand , the one comes form database comes
unreadable ?EEC? OE?E
Please I need your help , I do not want to lose my data in sql.Hi
How do you store arabic characters in the database?
I mean have you defined NAVARCHAR(n) daratype forther column/s?
<malbar99@.gmail.com> wrote in message
news:1144919506.830104.45910@.t31g2000cwb.googlegroups.com...
> all the data coming from sql unreadable like this one (C?C?E C'CI')
> If you go to this page http://72.41.53.93/new_index.asp
> you can see the Arabic character which is typed in the page coming
> correctly.
> while , on the other hand , the one comes form database comes
> unreadable ?EEC? OE?E
> Please I need your help , I do not want to lose my data in sql.
>

all the data coming from sql unreadable like this one (CC?E C?CI?)

all the data coming from sql unreadable like this one (C?C?E C'CI')
If you go to this page http://72.41.53.93/new_index.asp
you can see the Arabic character which is typed in the page coming
correctly.
while , on the other hand , the one comes form database comes
unreadable ?EEC? OE?E
Please I need your help , I do not want to lose my data in sql.Hi
How do you store arabic characters in the database?
I mean have you defined NAVARCHAR(n) daratype forther column/s?
<malbar99@.gmail.com> wrote in message
news:1144919506.830104.45910@.t31g2000cwb.googlegroups.com...
> all the data coming from sql unreadable like this one (C?C?E C'CI')
> If you go to this page http://72.41.53.93/new_index.asp
> you can see the Arabic character which is typed in the page coming
> correctly.
> while , on the other hand , the one comes form database comes
> unreadable ?EEC? OE?E
> Please I need your help , I do not want to lose my data in sql.
>

Sunday, February 12, 2012

All rows in a Sigle page

Hi guys,
I have requirement to show all the data from a table in a single page
or minimum 100 rows in the first page . How it is possible. Please any
body can solve my query.
Thanks in advance.
ShrinivasYou can go to report properties and adjust the page height in layout
tab.
Shrinivas wrote:
> Hi guys,
>
> I have requirement to show all the data from a table in a single page
> or minimum 100 rows in the first page . How it is possible. Please any
> body can solve my query.
> Thanks in advance.
> Shrinivas

All report in one page

Good morning,
I want my report to display only on one page but it always jump to a second page, the data needs to be viewed in it's totallity and not in parts.
I'm using VS2005 and Crystal Report 10.0 .
Is it possible?
Thanks alot!Make a custom page size for that particular report.

Thursday, February 9, 2012

Alignment/Formatting in Page Header...

I find that if I use a bunch of textboxes in a 'tabular' layout in the page
header (or anywhere) things dont line up quite right. I need a table in info
in the page header (not from a dataset just static text and param labels) so
I figure I'll use a table in the Page Header but it tells me that I cannot
use a 'data region' in the page header.
There has to be a way to create a 'table' like layout in the page header!
Any feedback/suggestions are greatly appreciated.Are you using the align to: top, bottom, side tools?
"Terry Mulvany" wrote:
> I find that if I use a bunch of textboxes in a 'tabular' layout in the page
> header (or anywhere) things dont line up quite right. I need a table in info
> in the page header (not from a dataset just static text and param labels) so
> I figure I'll use a table in the Page Header but it tells me that I cannot
> use a 'data region' in the page header.
> There has to be a way to create a 'table' like layout in the page header!
> Any feedback/suggestions are greatly appreciated.
>
>|||I have had similar problems in the past. I ended up using tables in the
"Body" of the Report to display static text and param value instead of
placing individual text boxes in the Page header. Make sure that you set the
property (RepeatonNewPage) for the static header in the table to repeat in
every page.
"Terry Mulvany" wrote:
> I find that if I use a bunch of textboxes in a 'tabular' layout in the page
> header (or anywhere) things dont line up quite right. I need a table in info
> in the page header (not from a dataset just static text and param labels) so
> I figure I'll use a table in the Page Header but it tells me that I cannot
> use a 'data region' in the page header.
> There has to be a way to create a 'table' like layout in the page header!
> Any feedback/suggestions are greatly appreciated.
>
>|||Yes, but this does not help. When the report runs the gaps between say 6 or
so rows of info varies and looks terrible, when I use a table (only
available in Body though) all rows have the same distance between them and
it looks very nice. MS needs to create a new 'layout' tollbox control (or
modify the existing table so it can be used as a non-data region object).
"BK9" <BK9@.discussions.microsoft.com> wrote in message
news:ACD30BAB-C2D8-4F42-8BD5-D9499CB77961@.microsoft.com...
> Are you using the align to: top, bottom, side tools?
> "Terry Mulvany" wrote:
>> I find that if I use a bunch of textboxes in a 'tabular' layout in the
>> page
>> header (or anywhere) things dont line up quite right. I need a table in
>> info
>> in the page header (not from a dataset just static text and param labels)
>> so
>> I figure I'll use a table in the Page Header but it tells me that I
>> cannot
>> use a 'data region' in the page header.
>> There has to be a way to create a 'table' like layout in the page header!
>> Any feedback/suggestions are greatly appreciated.
>>
>>|||Can't actually do this because I need to display different headers on
different pages (based on Globals!PageNumber) and just as Data Regions
(tables for instance) cannot be used in Page Header, 'Globals' cannot be
used in Body. So I am stuck!
"Taps" <Taps@.discussions.microsoft.com> wrote in message
news:B3F8D95E-9581-47A1-9B52-E79DC61D7782@.microsoft.com...
>I have had similar problems in the past. I ended up using tables in the
> "Body" of the Report to display static text and param value instead of
> placing individual text boxes in the Page header. Make sure that you set
> the
> property (RepeatonNewPage) for the static header in the table to repeat in
> every page.
> "Terry Mulvany" wrote:
>> I find that if I use a bunch of textboxes in a 'tabular' layout in the
>> page
>> header (or anywhere) things dont line up quite right. I need a table in
>> info
>> in the page header (not from a dataset just static text and param labels)
>> so
>> I figure I'll use a table in the Page Header but it tells me that I
>> cannot
>> use a 'data region' in the page header.
>> There has to be a way to create a 'table' like layout in the page header!
>> Any feedback/suggestions are greatly appreciated.
>>
>>