Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Monday, March 26, 2012

Forms authentication and URL access

Ive written a security extension based on microsoft samples, i can call the
SOAP API and get authenticated but i dont know what to do so i can use this
authentication method using URL access, i need that since i want to be able
to keep the toolbar.Rodrigo,
The typical integration scenario for Forms Autnentication and web-based URL
reporting is:
1. You have a web app which authenticates the user on the server side.
2. The web app calls LogonUser SOAP API.
3. The web app utilizes the Report Viewer or another approach (static
hyperlinks, client-side javascript, etc) to submit URL-based report
requests.
So, once the user is authenticated the we app just needs to submit report
requests on the client side of the application. As long as the
authentication ticket (cookie) is passed successfully, the reports should
render fine subject to aurhorization restrictions.
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Rodrigo Sánchez" <rodrigoss@.netshoreprogramming.com> wrote in message
news:%23p%23QEV5jEHA.704@.TK2MSFTNGP09.phx.gbl...
> Ive written a security extension based on microsoft samples, i can call
the
> SOAP API and get authenticated but i dont know what to do so i can use
this
> authentication method using URL access, i need that since i want to be
able
> to keep the toolbar.
>|||thanks, ill review my implementation and get back to you with more detail if
needed
"Teo Lachev" <teo.lachev@.nospam.prologika.com> escribió en el mensaje
news:%23rrIi15jEHA.592@.TK2MSFTNGP11.phx.gbl...
> Rodrigo,
> The typical integration scenario for Forms Autnentication and web-based
URL
> reporting is:
> 1. You have a web app which authenticates the user on the server side.
> 2. The web app calls LogonUser SOAP API.
> 3. The web app utilizes the Report Viewer or another approach (static
> hyperlinks, client-side javascript, etc) to submit URL-based report
> requests.
> So, once the user is authenticated the we app just needs to submit report
> requests on the client side of the application. As long as the
> authentication ticket (cookie) is passed successfully, the reports should
> render fine subject to aurhorization restrictions.
>
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Rodrigo Sánchez" <rodrigoss@.netshoreprogramming.com> wrote in message
> news:%23p%23QEV5jEHA.704@.TK2MSFTNGP09.phx.gbl...
> > Ive written a security extension based on microsoft samples, i can call
> the
> > SOAP API and get authenticated but i dont know what to do so i can use
> this
> > authentication method using URL access, i need that since i want to be
> able
> > to keep the toolbar.
> >
> >
>|||Teo - Is it a requirement of Forms Authentication that the users who are
authenticated to the ASP.NET web app have credentials defined in reporting
services? If not, how can you manage that user's rights?
thanks
"Teo Lachev" wrote:
> Rodrigo,
> The typical integration scenario for Forms Autnentication and web-based URL
> reporting is:
> 1. You have a web app which authenticates the user on the server side.
> 2. The web app calls LogonUser SOAP API.
> 3. The web app utilizes the Report Viewer or another approach (static
> hyperlinks, client-side javascript, etc) to submit URL-based report
> requests.
> So, once the user is authenticated the we app just needs to submit report
> requests on the client side of the application. As long as the
> authentication ticket (cookie) is passed successfully, the reports should
> render fine subject to aurhorization restrictions.
>
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Rodrigo Sánchez" <rodrigoss@.netshoreprogramming.com> wrote in message
> news:%23p%23QEV5jEHA.704@.TK2MSFTNGP09.phx.gbl...
> > Ive written a security extension based on microsoft samples, i can call
> the
> > SOAP API and get authenticated but i dont know what to do so i can use
> this
> > authentication method using URL access, i need that since i want to be
> able
> > to keep the toolbar.
> >
> >
>
>|||No credentials, just security policies in the report catalog. You would
typically use the Report Manager to set up your user security policy just
like you would normally do with Windows authentication.
Please note though that you don't have to register invividual users.
Instead, if it makes sense, you can group users into application-defined
roles outside of the Report Server. Then, in the Report Manager you will set
up security policies based the roles not users for easier maintainance.
Finally, in your CheckAccess overloads you need to take extra steps to find
out which role the user belongs to and authorize the user based on the user
role membership
Does this confuse even more :-)
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"ISGADMIN" <isgadmin@.newsgroup.nospam> wrote in message
news:9ABD45EE-390D-4272-A0AC-119114A0638E@.microsoft.com...
> Teo - Is it a requirement of Forms Authentication that the users who are
> authenticated to the ASP.NET web app have credentials defined in reporting
> services? If not, how can you manage that user's rights?
> thanks
> "Teo Lachev" wrote:
> > Rodrigo,
> >
> > The typical integration scenario for Forms Autnentication and web-based
URL
> > reporting is:
> > 1. You have a web app which authenticates the user on the server side.
> > 2. The web app calls LogonUser SOAP API.
> > 3. The web app utilizes the Report Viewer or another approach (static
> > hyperlinks, client-side javascript, etc) to submit URL-based report
> > requests.
> >
> > So, once the user is authenticated the we app just needs to submit
report
> > requests on the client side of the application. As long as the
> > authentication ticket (cookie) is passed successfully, the reports
should
> > render fine subject to aurhorization restrictions.
> >
> >
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Rodrigo Sánchez" <rodrigoss@.netshoreprogramming.com> wrote in message
> > news:%23p%23QEV5jEHA.704@.TK2MSFTNGP09.phx.gbl...
> > > Ive written a security extension based on microsoft samples, i can
call
> > the
> > > SOAP API and get authenticated but i dont know what to do so i can use
> > this
> > > authentication method using URL access, i need that since i want to be
> > able
> > > to keep the toolbar.
> > >
> > >
> >
> >
> >

Forms auth. Redirect failed

Hello,
(finally) I got forms authentication to work. I have one remaining problem.
If I use a URL to call a report, the logon dialog is displayed. That's ok.
If I logon (which works prefect) I receive the following error message from
the redirect call:
The return URL specified for request redirection is invalid.
RS (SQL 2005) is installed on a Windows 2003 Server SP2.
This is the URL in the address line of the browser, if the logon dialog
appears:
http://dev01/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%3f%2fPages%2fReportViewer.aspx%3f%252fSupport%252fTicketList%26rs%3aCommand%3dRender&%2fPages%2fReportViewer.aspx%3f%2fSupport%2fTicketList&rs%3aCommand=Render
SSL is not activated jet, becouse I'm not productive right now.
The problem is in the development envoirment and appears also on the
web-server. On both machines forms authentication works.
I can't direct the users to the ReportServer page to select reports by them
selfe. They need to call Reports using URL Access.
Any help would be appreciated.
I don't know what's wrong with URL, how to config RS to change the URL, or
how to write a different redirect command in the security sample.
Detailed (exact) explanation would be great.I solved this problem.
The couse was the last part of the URL "&rs%3aCommand=Render".
After removing this part the redirect worked.
"Ralf Stofer" wrote:
> Hello,
> (finally) I got forms authentication to work. I have one remaining problem.
> If I use a URL to call a report, the logon dialog is displayed. That's ok.
> If I logon (which works prefect) I receive the following error message from
> the redirect call:
> The return URL specified for request redirection is invalid.
> RS (SQL 2005) is installed on a Windows 2003 Server SP2.
> This is the URL in the address line of the browser, if the logon dialog
> appears:
> http://dev01/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%3f%2fPages%2fReportViewer.aspx%3f%252fSupport%252fTicketList%26rs%3aCommand%3dRender&%2fPages%2fReportViewer.aspx%3f%2fSupport%2fTicketList&rs%3aCommand=Render
> SSL is not activated jet, becouse I'm not productive right now.
> The problem is in the development envoirment and appears also on the
> web-server. On both machines forms authentication works.
> I can't direct the users to the ReportServer page to select reports by them
> selfe. They need to call Reports using URL Access.
> Any help would be appreciated.
> I don't know what's wrong with URL, how to config RS to change the URL, or
> how to write a different redirect command in the security sample.
> Detailed (exact) explanation would be great.
>

Wednesday, March 7, 2012

Format on text box not working as expected

I have a table in a report that is displaying some call duration data. I
have a field that averages the results and displays them. My issue is the
result is often a number with many decimal places (example 15.888883) and I
would like the field to display a whole number (example 15).
In report designer I right click on the cell in the table I wish to alter
and choose properties. In the Textbox Properties window under Format I
select Number and then 1234 (custom code D0) and click OK. I then preview
the report and the number still shows a bunch of decimal places.
When I go back to check the properties of the cell the Format is often reset
back to 'Default' as if it didn't save my select. I've tried using the
Standard and Custom radio buttons under Format but nothing I do seems to
change the display of the number to a nondecimal type. I'm sure I can run a
function that rounds the number but I'd much rather do it in the display as
it seems you should be able to do.
Any help would be appreciated!
Peace,
DanDan,
I'm not aware of this as a bug but if it is try setting it in the
properties window (not the same as right-click|properties) if you can't
see it, press F4. You will see a 'Format' property, set that to d0 or
alternatively try n0 (puts a comma in as a thousands seperator).
Chris
Dan Christjohn wrote:
> I have a table in a report that is displaying some call duration
> data. I have a field that averages the results and displays them. My
> issue is the result is often a number with many decimal places
> (example 15.888883) and I would like the field to display a whole
> number (example 15).
> In report designer I right click on the cell in the table I wish to
> alter and choose properties. In the Textbox Properties window under
> Format I select Number and then 1234 (custom code D0) and click OK. I
> then preview the report and the number still shows a bunch of decimal
> places.
> When I go back to check the properties of the cell the Format is
> often reset back to 'Default' as if it didn't save my select. I've
> tried using the Standard and Custom radio buttons under Format but
> nothing I do seems to change the display of the number to a
> nondecimal type. I'm sure I can run a function that rounds the number
> but I'd much rather do it in the display as it seems you should be
> able to do.
> Any help would be appreciated!
> Peace,
> Dan|||Chris,
Thank you for your reply. d0 did not work and that was a value for format
that I had already tried. n0 however worked great and change the display
from 8.333333336 to 8 exactly the way I want it. Weird how that's not one of
the choices when you rightclick/format and it shows the standard formatting.
Oh well it works, thanks much!
Peace,
Dan
"Chris McGuigan" <chris.mcguigan@.zycko.com> wrote in message
news:ez03hkRiFHA.1204@.TK2MSFTNGP12.phx.gbl...
> Dan,
> I'm not aware of this as a bug but if it is try setting it in the
> properties window (not the same as right-click|properties) if you can't
> see it, press F4. You will see a 'Format' property, set that to d0 or
> alternatively try n0 (puts a comma in as a thousands seperator).
> Chris
>
> Dan Christjohn wrote:
>> I have a table in a report that is displaying some call duration
>> data. I have a field that averages the results and displays them. My
>> issue is the result is often a number with many decimal places
>> (example 15.888883) and I would like the field to display a whole
>> number (example 15).
>> In report designer I right click on the cell in the table I wish to
>> alter and choose properties. In the Textbox Properties window under
>> Format I select Number and then 1234 (custom code D0) and click OK. I
>> then preview the report and the number still shows a bunch of decimal
>> places.
>> When I go back to check the properties of the cell the Format is
>> often reset back to 'Default' as if it didn't save my select. I've
>> tried using the Standard and Custom radio buttons under Format but
>> nothing I do seems to change the display of the number to a
>> nondecimal type. I'm sure I can run a function that rounds the number
>> but I'd much rather do it in the display as it seems you should be
>> able to do.
>> Any help would be appreciated!
>> Peace,
>> Dan
>|||Hi,
I just had the exact same problem. Choosing D0 does not work, but N0
does. This behaviour is weird and should be fixed because N0 puts a
comma in there.
e.g.
source = 2793.333333
D0 = 2793.333333
N0 = 2,793
When what I really want is 2793!! I think this is a bug. Internally,
the casting from float (with decimal) places is not being converted to
integeter properly.|||I think n with no zero will remove the comma but I'd have to test it to be
sure.
"Roy Assaly" <royassaly@.gmail.com> wrote in message
news:1121885650.591601.179260@.g43g2000cwa.googlegroups.com...
> Hi,
> I just had the exact same problem. Choosing D0 does not work, but N0
> does. This behaviour is weird and should be fixed because N0 puts a
> comma in there.
> e.g.
> source = 2793.333333
> D0 = 2793.333333
> N0 = 2,793
> When what I really want is 2793!! I think this is a bug. Internally,
> the casting from float (with decimal) places is not being converted to
> integeter properly.
>|||Hi Dan,
Just tested it:
source = 2793.333333
n = 2793.33
N = 2793.33
No difference. I still believe that D0 is the problem and that it's a
bug.|||'n' on it's own will always default to 2 decimal places.
I think the 'D' issue is because d or D is also a date format code it
may be getting confused!?!
You may want to consider custom format codes.
#0 or ## will give you 2793 with no commas. Using this you can specify
different formatting for positive, negative and zero numbers.
i.e. a format code of #,#;(#,#);"zero" would produce
2793 = 2,793
-2793 = (2,793)
0 = zero
Look up custom format codes in msdn vb help.
Chris
Roy Assaly wrote:
> Hi Dan,
> Just tested it:
> source = 2793.333333
> n = 2793.33
> N = 2793.33
> No difference. I still believe that D0 is the problem and that it's a
> bug.

Friday, February 24, 2012

Format display of current row

Hi!

I'm wondering is there any simple way to achieve the following
function call in SQL Server. The sentence to translate is (Oracle
syntax):

to_char(rownum, '000')

rownum: number of the current row

to_char: formats a number (the 1st param) according to the format
defined in the 2nd param. In this case, the '000' preprends 2 or more
zeros until forming a 3-digit number.

I'm using it in something like:

SELECT id_table, string_column || TO_CHAR(ROWNUM,'000') FROM table

Thanx a bunch,
CroNo such thing as a "row number" in SQL Server. Explain what you want to do
so that we can suggest some alternatives.

The Standard SQL alternative to TO_CHAR is the CAST function (CAST(x AS
VARCHAR) or CAST(x AS CHAR)) and that is supported by SQL Server.

--
David Portas
SQL Server MVP
--|||replace(str(123, 3,0),' ', '0')

where 123 is your number, 3 is the lenght(number of zeros to padd) and
0 is the number of decimals places to show

yuck, but it works|||I usually use the following when trying to zero-pad numbers:

SELECT RIGHT('000' + CAST(my_num AS VARCHAR), 3)

-Tom.|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message news:<-oWdnSaXw8NBEfXfRVn-iA@.giganews.com>...
> No such thing as a "row number" in SQL Server. Explain what you want to do
> so that we can suggest some alternatives.
> The Standard SQL alternative to TO_CHAR is the CAST function (CAST(x AS
> VARCHAR) or CAST(x AS CHAR)) and that is supported by SQL Server.

The idea behind is creating a stored procedure that retrieves a
numbered list of elements. This list could be displayed in the web, so
it needs to have that "rownum":

SELECT rn, el
FROM (
SELECT <<rownum>> AS rn, element AS el
FROM table
) AS tmp

I've seen some approaches using rank=count(*), but they look ugly.
Could I use something like a temporal sequence in SQL Server?

Thanx again,
Cro|||Why not create the table with a unique column for the display order of
the list elements? If the column is integer, you willnot have to pad a
string with zeroes -- that kind of display is supposed to be done in
the front end, not the database.|||Don Croata (el.croata@.gmail.com) writes:
> The idea behind is creating a stored procedure that retrieves a
> numbered list of elements. This list could be displayed in the web, so
> it needs to have that "rownum":
> SELECT rn, el
> FROM (
> SELECT <<rownum>> AS rn, element AS el
> FROM table
> ) AS tmp
> I've seen some approaches using rank=count(*), but they look ugly.
> Could I use something like a temporal sequence in SQL Server?

There is a row_number() function in SQL 2005, currently in beta.
Beware that this is not a row_number of Oracle fame, but one
related to the actual result set. The syntax is also a little more
complicated. If memory serves, this is derived from the SQL-99 standard.

For SQL-2000 the best bet is probably to say:

CREATE TABLE #t (row_number int IDENTITY,
col1 ...)
INSERT #t (col1, )
SELECT col1, ...
FROM ...
ORDER BY

Note that you cannot use SELECT INTO for this, as it's not guaranteed
that the identity value will follow the ORDER BY clause in this case.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp