Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Thursday, March 29, 2012

Formula to view records

Hi,
I am having a report which takes a parameter to view records based on the parameter value passed to it.

I need to check the length of the parameter, if the length of the parameter value is "4", it should compare the parameter value with one field value, if the length is more than 4, then it should compare the value with another field and shoe me the records.

I have made the formula, but it doesn't show records, where as there are records in the table.

how could i do that ? Is anybody there, who could help me in that?

Thanks in advance.

Regards

DeepakIf len(parameter)=4 then
--do some work
else
--do some other work

Do you want to do this from Front end application?

Formula to Summarizie records

Hi, I have a report which will obtain following set of data, for example:

NumberPacking CasePackingDesc Amount
2 Bottle 32kg
1 Bottle 10kg
2 Case 10kg
-----------
TOTAL 3 Bottle 52kg
2 Case

I have problem generating the TOTAL of 3 bottle and 2 case. I would like to write a formula field to return the result, but I don't know how to loop though all the records in the record sets.

Here is the formula field I have done so far:

Local stringVar temp := "";
Local numberVar i;
for i:= 1 to DistinctCount({Table.CasePackingDesc}) step 1 do
(
temp := temp + CStr (Sum ({@.NumberPacking})) + {Table.CasePackingDesc} + Chr(13);
);
temp

It basically return the same CasePackingDesc for 2 times.

Any idea on this will be greatly appreciated, thanks!have you tried the
WhilePrintingRecords
Statement to loop through the Datasets.

You dont need the for loop in the formulafield.
Write the Result of your account in a global variable.sql

Formula Problem

I get the following error in Report Manager when running a report. The
report runs perfect in visual studio when I preview it.
Reporting Services Error
_____
* An error has occurred during report processing. (rsProcessingAborted)
Get Online Help
* The sort expression for the grouping 'table1_Group1' uses a numeric
aggregate function on data that is not numeric. Numeric aggregate
functions (Sum, Avg, StDev, Var, StDevP, and VarP) can only aggregate
numeric data. (rsProcessingError) Get Online Help
_____
Microsoft Reporting Services
I pass two parameters, qty and sortdate. As the formulas show below,
when they select qty and ascending, it uses sum(fields). When I pick
date, it does not use sum.
This will sort by the value in the sortby parameter. Used for sortdate
field in data.
=iif(Parameters!Direction.Value="Descending" AND
Parameters!SortBy.Value<>"quantity",Fields(Parameters!SortBy.Value).Value,0)
When I need to sort by the sum of the qty since it is grouped, I do
this...
=iif(Parameters!Direction.Value="Descending" AND
Parameters!SortBy.Value="quantity",sum(Fields(Parameters!SortBy.Value).Value),0)
As I said above, this works perfect in visual studio when I preview it.
Any Ideas?What is the datatype of Fields!quantity.Value? Most likely it is not a
System.Int32 at runtime.
You may want to try this (assuming you want to sum up integers):
=iif(Parameters!Direction.Value="Descending" AND
Parameters!SortBy.Value="quantity",
sum(CInt(Fields(Parameters!SortBy.Value).Value)), 0)
Or use this if you want to actually sum double:
=iif(Parameters!Direction.Value="Descending" AND
Parameters!SortBy.Value="quantity",
sum(CDbl(Fields(Parameters!SortBy.Value).Value)), 0.0)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"John Geddes" <john_g@.alamode.com> wrote in message
news:eTl79Cj4EHA.3504@.TK2MSFTNGP12.phx.gbl...
> I get the following error in Report Manager when running a report. The
> report runs perfect in visual studio when I preview it.
> Reporting Services Error
> _____
>
> * An error has occurred during report processing. (rsProcessingAborted)
> Get Online Help
> * The sort expression for the grouping 'table1_Group1' uses a numeric
> aggregate function on data that is not numeric. Numeric aggregate
> functions (Sum, Avg, StDev, Var, StDevP, and VarP) can only aggregate
> numeric data. (rsProcessingError) Get Online Help
> _____
> Microsoft Reporting Services
>
> I pass two parameters, qty and sortdate. As the formulas show below,
> when they select qty and ascending, it uses sum(fields). When I pick
> date, it does not use sum.
> This will sort by the value in the sortby parameter. Used for sortdate
> field in data.
> =iif(Parameters!Direction.Value="Descending" AND
>
Parameters!SortBy.Value<>"quantity",Fields(Parameters!SortBy.Value).Value,0)
> When I need to sort by the sum of the qty since it is grouped, I do
> this...
> =iif(Parameters!Direction.Value="Descending" AND
>
Parameters!SortBy.Value="quantity",sum(Fields(Parameters!SortBy.Value).Value
),0)
>
> As I said above, this works perfect in visual studio when I preview it.
> Any Ideas?
>

Formula in Excel Sheet

Hello,

I have one simple Report in SQL Reporting Services.

there are only Three Columns GroupName, Description, Amount.

In this report there is Grouping on GroupName Field.

In Group Footer in want Group Total. i'm writting here like =Sum(Fields!Amount.Value)

Now, while preview of this report I'm exporting the same to Excel File.

While opening that Excel file in Group Footer there is no Formula which i written in .rdl file.

If any one can help me out on this Formula field it will be great.

Thank You.

Unfortunately the Excel export doesn't support this.

Formulas are only translated to Excel formulas when they use references to report items instead of fields. For example, instead of "=Fields!Amount.Value" you would use "=ReportItems!AmountTextBox.Value". You can use these to get add two values together on the same row, for instance.

However, you can only use aggregate functions such as SUM on report items when the expression is in the page header or footer. So you won't be able to use, say "=SUM(ReportItems!AmountTextBox.Value" in the table footer.

We are aware that this severely limits the utility of formulas in Excel, and are considering ways to improve it. We do not have a timeframe for this at this time.

Formula Help

I have a report that I need to take the average of a total(s)...
For example
I have a field that is a sum of units(number) and then I have a field that is a count of payments(number). I need to average these two fields,so that I have the average # of payments?How can I do this?I would try creating a new formula and expand the "REPORT FIELDS" in the tree within the formula editor (2nd one from left) and pull the applicable summary fields in. I'm not positive that would work as I haven't tried it before.|||I've tried that but it gives me an error of

The Summary/Running Total field cannot be created.|||I just tested it in a report I have and it worked just fine. Where are you trying to use it? You will not be able to use it in the details, but it would have to fall in the same group footer as the summary.|||These calculations are in the group footer. I need to average the grand totals.

What formula are you using? These are the two fields that I need to use

(Sum ({CLCHARGE.CUNITS}, {CLPAYMNT.COMPANY}) and
Count({CLPAYMNT.CHGID},{CLPAYMNT.COMPANY})|||Sorry I didn't ask this in the previous post, but what version of CR are you using? I am on 10, so if you are earlier, maybe it doesn't support those calculations in the same way it does for me. If you are 10 or XI, then I would need to ask - did you create formulas for the summaries or did you use the INSERT / SUMMARY from the menu bar? If you created the summaries by letting CR do it via the INSERT / SUMMARY, then you create a separate formula that drags those summaries in to the formula editor (typing a "/" between them), it should work.|||I am using 8.5|||It may be that you can't do it from 8.5. I'm sorry that I couldn't help you.|||I was afraid of that...Thanks for you help anyway.|||Hi there I have an average formula setup in one of my reports using CR 8.5.

whileprintingrecords;

numbervar TotalTsec;
local numbervar AverageFix:=TotalTsec/DistinctCount ({SW_CASE.swCaseId});
numbervar LenOfDay;

Hope this points you in the right direction !

Many Thanks

Formula help

Report Field (LastApptDate)
I want to take the CurrentDate - LastApptDate and if its Less than 1500 days, to produce an "X" or else nothing
The second part is CurrentDate - LastApptDate - if it greater than 1500 days to produce an "X" else nothingI just started a new job and don't have access to anything yet, but if I had access to some data to test it, I think it would go something like this:

if DateDiff("d",LastApptDate,CurrentDate) >= 1500 then

"x"

else

""

or maybe like this:

if LastApptDate >= DateAdd("d", -1500, CurrentDate) then

"X"

else

""

Formula for Graph Size

I have a report control in my report. But I want to expand graph depending on the selected number of months (Parameter) by users.

But there is no formula option for graph control. Is there any workaround?

You might be able to do something with padding. But that would not change the space your graph takes up in the page, you would just have more (or less) white space, depending on your current data.

>L<

sql

Formula Field

I'm using the crystal report of VB.Net 2005 I've tried to write
ReportInstance.DataDefinition.FormulaFields(index).Text = "{DataTable.ColumnName}"
but it didn't work ,I've found that FormulaFields is read only,is there a way to do my point,I mean I need to assign column names of a datatble to the FormulaField(index).Try this, the following code has always worked for me:

For Each crxFormulaField In crxReport.FormulaFields
Select Case crxFormulaField.Name
Case "{@.YourFormulaName}"
crxFormulaField.Text = "{DataTable.ColumnName}"
End Select
Next crxFormulaField

Good luck!
-- Heather

Tuesday, March 27, 2012

Forms Authentication, LogonUser, and certificates

We are having an issue getting Report Manager to work with SSL.
Here's the setup:
We have thatken the forms authetication example and have modified it
to suit our needs, and it works fine (no SSL at this point). Now, we
want to make our application available over the Internet, so we have
gotten a certificate from VeriSign and turned on SSL - the application
works fine.
The snag comes in with trying to access the Report Manager (even from
the machine it is installed on). When I debug using Visual Studio,
the problem occurs in the UILogin.aspx when calling the
ReportingService's LogonUser class. The error that is reported is
"The underlying connection was closed: Could not establish trust
relationship with remote server." It seems like the cetificate is not
being accepted by the reporting service. From reading this forum, I
understand that the URL of the ReportingService object should be set
to "https://<machine_name>/ReportServer/reportservice.asmx". However,
our certificate from VeriSign has our production website name, which
obviously does not match the machine name. Could this be causing the
problem? If so, is there a way around this?
We do NOT want the Report Manger available over the internet, just
locally. A hokey solution is OK, as long as it keeps the Reporting
Service secure. I anybody has any insights into this situation would
be greatly appreaciated.
Thanks,
Terry RomanceTerry,
Is UseSSL in the the Report Manager RSWebApplication.config file on, such
as:
<UI>
<CustomAuthenticationUI>
<loginUrl>/Pages/UILogon.aspx</loginUrl>
<UseSSL>True</UseSSL>
</CustomAuthenticationUI>
<!--Change the following line to reflect the computer name where RS is
installed. DON NOT USE LOCALHOST-->
<ReportServerUrl>http://MyRSServer/ReportServer</ReportServerUrl>
</UI>
Yes, it will be a good idea to move the Report Manager to a private subnet
if you don't need it to be accessible on Internet. But I don't think this
will solve your issue.
In addition make sure your access the Report Manager by using the computer
name where it is not installed, not localhost.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.manning.com/lachev
Home page and blog http://www.prologika.com
---
"Terry Romance" <tedgromance@.yahoo.com> wrote in message
news:f284ebe.0408231338.3fa07029@.posting.google.com...
> We are having an issue getting Report Manager to work with SSL.
> Here's the setup:
> We have thatken the forms authetication example and have modified it
> to suit our needs, and it works fine (no SSL at this point). Now, we
> want to make our application available over the Internet, so we have
> gotten a certificate from VeriSign and turned on SSL - the application
> works fine.
> The snag comes in with trying to access the Report Manager (even from
> the machine it is installed on). When I debug using Visual Studio,
> the problem occurs in the UILogin.aspx when calling the
> ReportingService's LogonUser class. The error that is reported is
> "The underlying connection was closed: Could not establish trust
> relationship with remote server." It seems like the cetificate is not
> being accepted by the reporting service. From reading this forum, I
> understand that the URL of the ReportingService object should be set
> to "https://<machine_name>/ReportServer/reportservice.asmx". However,
> our certificate from VeriSign has our production website name, which
> obviously does not match the machine name. Could this be causing the
> problem? If so, is there a way around this?
> We do NOT want the Report Manger available over the internet, just
> locally. A hokey solution is OK, as long as it keeps the Reporting
> Service secure. I anybody has any insights into this situation would
> be greatly appreaciated.
> Thanks,
> Terry Romance|||Teo,
Thanks for the reply. I have SSL turned on, and here is the
relevant section of the RSWebApplication.config file:
<UI>
<CustomAuthenticationUI>
<loginUrl>/Pages/UILogin.aspx</loginUrl>
<UseSSL>True</UseSSL>
</CustomAuthenticationUI>
<ReportServerUrl>https://<machine_name>/ReportServer</ReportServerUrl>
</UI>
(I have the actual machine name, not 'localhost')
I also have the following in RSReportServer.config:
<Add Key="SecureConnectionLevel" Value="3"/>
I noticed in your post you had http: instead of https: - when I tried
making that change in the RSWebApplication.config file, I received the
following exception instead:
"The operation you are attempting requires a secure connection
(HTTPS)."
So, I'm guessing that the https: is correct.
Does my guess that it is a problem with the difference between the
name in the config file and the name on the certificate that is
causing the error?
I can validate the user directly using my own code, but is there any
way I could create a certificate on the fly and pass it to the Report
Server so that it will then allow the user into the Report Manager?
Currently we are stuck with switching back to Windows authentication
or turning off SSL.
Any ideas would be helpful at this point.
Thanks,
Terry
"Teo Lachev" <teo@.nospam.prologika.com> wrote in message news:<eeC9HLYiEHA.3876@.TK2MSFTNGP12.phx.gbl>...
> Terry,
> Is UseSSL in the the Report Manager RSWebApplication.config file on, such
> as:
> <UI>
> <CustomAuthenticationUI>
> <loginUrl>/Pages/UILogon.aspx</loginUrl>
> <UseSSL>True</UseSSL>
> </CustomAuthenticationUI>
> <!--Change the following line to reflect the computer name where RS is
> installed. DON NOT USE LOCALHOST-->
> <ReportServerUrl>http://MyRSServer/ReportServer</ReportServerUrl>
> </UI>
> Yes, it will be a good idea to move the Report Manager to a private subnet
> if you don't need it to be accessible on Internet. But I don't think this
> will solve your issue.
> In addition make sure your access the Report Manager by using the computer
> name where it is not installed, not localhost.
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.manning.com/lachev
> Home page and blog http://www.prologika.com
> ---|||Terry,
Yes, it should be https. I doubt that the problem is with the certificate.
What does navigating to https://machine_name/reportserver give you?
In addition, according to your explanation this error only happens with the
Report Manager. Have you tried callling LogonUser from another application?
Is the call successful?
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.manning.com/lachev
Home page and blog http://www.prologika.com
---
"Terry Romance" <tedgromance@.yahoo.com> wrote in message
news:f284ebe.0408240416.130c778e@.posting.google.com...
> Teo,
> Thanks for the reply. I have SSL turned on, and here is the
> relevant section of the RSWebApplication.config file:
> <UI>
> <CustomAuthenticationUI>
> <loginUrl>/Pages/UILogin.aspx</loginUrl>
> <UseSSL>True</UseSSL>
> </CustomAuthenticationUI>
> <ReportServerUrl>https://<machine_name>/ReportServer</ReportServerUrl>
> </UI>
> (I have the actual machine name, not 'localhost')
> I also have the following in RSReportServer.config:
> <Add Key="SecureConnectionLevel" Value="3"/>
> I noticed in your post you had http: instead of https: - when I tried
> making that change in the RSWebApplication.config file, I received the
> following exception instead:
> "The operation you are attempting requires a secure connection
> (HTTPS)."
> So, I'm guessing that the https: is correct.
> Does my guess that it is a problem with the difference between the
> name in the config file and the name on the certificate that is
> causing the error?
> I can validate the user directly using my own code, but is there any
> way I could create a certificate on the fly and pass it to the Report
> Server so that it will then allow the user into the Report Manager?
> Currently we are stuck with switching back to Windows authentication
> or turning off SSL.
> Any ideas would be helpful at this point.
> Thanks,
> Terry
>
> "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
news:<eeC9HLYiEHA.3876@.TK2MSFTNGP12.phx.gbl>...
> > Terry,
> >
> > Is UseSSL in the the Report Manager RSWebApplication.config file on,
such
> > as:
> >
> > <UI>
> > <CustomAuthenticationUI>
> > <loginUrl>/Pages/UILogon.aspx</loginUrl>
> > <UseSSL>True</UseSSL>
> > </CustomAuthenticationUI>
> > <!--Change the following line to reflect the computer name where RS is
> > installed. DON NOT USE LOCALHOST-->
> > <ReportServerUrl>http://MyRSServer/ReportServer</ReportServerUrl>
> > </UI>
> >
> > Yes, it will be a good idea to move the Report Manager to a private
subnet
> > if you don't need it to be accessible on Internet. But I don't think
this
> > will solve your issue.
> >
> > In addition make sure your access the Report Manager by using the
computer
> > name where it is not installed, not localhost.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > http://www.manning.com/lachev
> > Home page and blog http://www.prologika.com
> > ---|||Teo,
Thanks for your continuing help.
When I navigate to "https://machine_name/reportserver", it
redirects me to the Report Server's login screen (Login.aspx, not the
Report Manager's login, which is UILogin.apsx). I am able to login
successfully there - the validation is handled by my own DB lookup, it
then calls FormsAuthentication.RedirectFromLoginPage if the user is
verified.
I did try connecting to the report manager from an externally
(since I believed this would resolve any differences between the
domain name I was connecting to, and the name on the certificate). In
the debugger, execution seemed to hang on the LogonUser call, before
it eventually returned the following message:
"A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection
failed because connected host has failed to respond."
This is different from the message I received when trying to
connect internally (the "trused connection" message). I never
received any prompt message in IE running on the external machine to
indicate that it was waiting for input. Does this help narrow down
what the problem might be?
I have not tried calling LogonUser from another application, but
I will try doing that and post the results.
Again, I appreciate all your help.
Thanks,
Terry
"Teo Lachev" <teo@.nospam.prologika.com> wrote in message news:<ekCmv1diEHA.3944@.tk2msftngp13.phx.gbl>...
> Terry,
> Yes, it should be https. I doubt that the problem is with the certificate.
> What does navigating to https://machine_name/reportserver give you?
> In addition, according to your explanation this error only happens with the
> Report Manager. Have you tried callling LogonUser from another application?
> Is the call successful?
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.manning.com/lachev
> Home page and blog http://www.prologika.com
> ---
>|||Teo,
I hope you are still out there monitoring this thread. I'm
sorry, but we had another issue here that required my attention.
I was finally able to try to code a small test application to
call LogonUser. The result is the same: "The underlying connection
was closed: Could not establish trust relationship with remote
server."
We are currently stuck with switching back to the original config
files and Windows Authentication to access the Report Manager, and
then going back to our custom security when we are done, but this is
by no means a good long-term solution. At this point, I'll welcome
any suggestion or experiment to try.
Thanks in advance.
- Terry
> "Teo Lachev" <teo@.nospam.prologika.com> wrote in message news:<ekCmv1diEHA.3944@.tk2msftngp13.phx.gbl>...
> > Terry,
> >
> > Yes, it should be https. I doubt that the problem is with the certificate.
> > What does navigating to https://machine_name/reportserver give you?
> >
> > In addition, according to your explanation this error only happens with the
> > Report Manager. Have you tried callling LogonUser from another application?
> > Is the call successful?
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > http://www.manning.com/lachev
> > Home page and blog http://www.prologika.com
> > ---
> >|||Terry,
Check these threads:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=%22The+underlying+connection+was+closed%3A+Could+not+establish+trust+relationship+%22&btnG=Search
In addition, if you use client certificates review this:
This article was previously published under Q318103
SYMPTOMS
Note The following .NET Framework Class Library namespaces are referenced in
this article:
System.Web.Services
System.Security.Cryptography.X509Certificates
When you try to pass a client certificate from an ASP.NET page to a Web
service that requires Secure Sockets Layer (SSL) and client certificates,
you receive the following error message:
403 Access Denied
CAUSE
A certificate is associated with the user ID of the user who installed the
certificate (this is the certificate user); therefore, the certificate is
available only when that user profile is loaded. If no one is logged on to
the computer, or if a user other than the certificate owner is logged on,
the certificate is not accessible.
If you access the Web service .asmx file from a browser that passes the
certificates to you, you do not encounter this problem.
The following ASP.NET code fails when calling SimpleServices, which expects
a client certificate:
public void Submit_HelloWorldClick(Object sender, EventArgs E)
{
// Instantiate the proxy class for the web service
SimpleService service = new SimpleService();
// Pass in credentials using NTLM
service.Credentials = CredentialCache.DefaultCredentials;
// Load the client certificate from a file
X509Certificate x509 =X509Certificate.CreateFromCertFile(@."c:\user_der.cer");
service.ClientCertificates.Add(x509);
// Call the service
Result.Text = service.HelloWorld();
}
RESOLUTION
To resolve this issue, invoke the Web service from a Serviced Component, and
use a Microsoft Windows service to automatically load the profile of the
certificate user so that the Serviced Component can retrieve the client
certificate and then communicate with the Web service over SSL.
1.. Create a Windows service program with only one function to run under
the certificate user identity.
2.. Create a Serviced Component that runs under the identity of the
certificate user.
3.. Move the authentication code from the ASP.NET application to the
Serviced Component. Verify that the Serviced Component runs under the
identity of the certificate user.
4.. Call the Serviced Component method from the ASP.NET Web application.
STATUS
This behavior is by design.
--
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/
----
"Terry Romance" <tedgromance@.yahoo.com> wrote in message
news:f284ebe.0409131008.e9801ec@.posting.google.com...
> Teo,
> I hope you are still out there monitoring this thread. I'm
> sorry, but we had another issue here that required my attention.
> I was finally able to try to code a small test application to
> call LogonUser. The result is the same: "The underlying connection
> was closed: Could not establish trust relationship with remote
> server."
> We are currently stuck with switching back to the original config
> files and Windows Authentication to access the Report Manager, and
> then going back to our custom security when we are done, but this is
> by no means a good long-term solution. At this point, I'll welcome
> any suggestion or experiment to try.
> Thanks in advance.
> - Terry
> > "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
news:<ekCmv1diEHA.3944@.tk2msftngp13.phx.gbl>...
> > > Terry,
> > >
> > > Yes, it should be https. I doubt that the problem is with the
certificate.
> > > What does navigating to https://machine_name/reportserver give you?
> > >
> > > In addition, according to your explanation this error only happens
with the
> > > Report Manager. Have you tried callling LogonUser from another
application?
> > > Is the call successful?
> > > --
> > > Hope this helps.
> > >
> > > ---
> > > Teo Lachev, MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > http://www.manning.com/lachev
> > > Home page and blog http://www.prologika.com
> > > ---
> > >|||Basically, you have to disable certificate checking for the RM application.
You do this by writing a custom certificate checker and just ignoring errors
in that checker. You can make this part of your UILogon code.
Hope this helps.
--Carlos
"Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
news:uWfcNndmEHA.512@.TK2MSFTNGP10.phx.gbl...
> Terry,
> Check these threads:
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=%22The+underlying+connection+was+closed%3A+Could+not+establish+trust+relationship+%22&btnG=Search
> In addition, if you use client certificates review this:
> This article was previously published under Q318103
> SYMPTOMS
> Note The following .NET Framework Class Library namespaces are referenced
in
> this article:
> System.Web.Services
> System.Security.Cryptography.X509Certificates
> When you try to pass a client certificate from an ASP.NET page to a Web
> service that requires Secure Sockets Layer (SSL) and client certificates,
> you receive the following error message:
> 403 Access Denied
> CAUSE
> A certificate is associated with the user ID of the user who installed the
> certificate (this is the certificate user); therefore, the certificate is
> available only when that user profile is loaded. If no one is logged on to
> the computer, or if a user other than the certificate owner is logged on,
> the certificate is not accessible.
> If you access the Web service .asmx file from a browser that passes the
> certificates to you, you do not encounter this problem.
> The following ASP.NET code fails when calling SimpleServices, which
expects
> a client certificate:
> public void Submit_HelloWorldClick(Object sender, EventArgs E)
> {
> // Instantiate the proxy class for the web service
> SimpleService service = new SimpleService();
> // Pass in credentials using NTLM
> service.Credentials = CredentialCache.DefaultCredentials;
> // Load the client certificate from a file
> X509Certificate x509 => X509Certificate.CreateFromCertFile(@."c:\user_der.cer");
> service.ClientCertificates.Add(x509);
> // Call the service
> Result.Text = service.HelloWorld();
> }
> RESOLUTION
> To resolve this issue, invoke the Web service from a Serviced Component,
and
> use a Microsoft Windows service to automatically load the profile of the
> certificate user so that the Serviced Component can retrieve the client
> certificate and then communicate with the Web service over SSL.
> 1.. Create a Windows service program with only one function to run under
> the certificate user identity.
> 2.. Create a Serviced Component that runs under the identity of the
> certificate user.
> 3.. Move the authentication code from the ASP.NET application to the
> Serviced Component. Verify that the Serviced Component runs under the
> identity of the certificate user.
> 4.. Call the Serviced Component method from the ASP.NET Web application.
> STATUS
> This behavior is by design.
> --
> 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/
> ----
> "Terry Romance" <tedgromance@.yahoo.com> wrote in message
> news:f284ebe.0409131008.e9801ec@.posting.google.com...
> > Teo,
> >
> > I hope you are still out there monitoring this thread. I'm
> > sorry, but we had another issue here that required my attention.
> >
> > I was finally able to try to code a small test application to
> > call LogonUser. The result is the same: "The underlying connection
> > was closed: Could not establish trust relationship with remote
> > server."
> >
> > We are currently stuck with switching back to the original config
> > files and Windows Authentication to access the Report Manager, and
> > then going back to our custom security when we are done, but this is
> > by no means a good long-term solution. At this point, I'll welcome
> > any suggestion or experiment to try.
> >
> > Thanks in advance.
> >
> > - Terry
> >
> > > "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
> news:<ekCmv1diEHA.3944@.tk2msftngp13.phx.gbl>...
> > > > Terry,
> > > >
> > > > Yes, it should be https. I doubt that the problem is with the
> certificate.
> > > > What does navigating to https://machine_name/reportserver give you?
> > > >
> > > > In addition, according to your explanation this error only happens
> with the
> > > > Report Manager. Have you tried callling LogonUser from another
> application?
> > > > Is the call successful?
> > > > --
> > > > Hope this helps.
> > > >
> > > > ---
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > http://www.manning.com/lachev
> > > > Home page and blog http://www.prologika.com
> > > > ---
> > > >
>|||Carlos,
Thanks for the reply. If it makes a difference, we are NOT using
client certificates.
Excuse me for asking, but I am relatively new with Reporting
Services, Visual Studio .NET, SSL and certificates, and I have no idea
how to disable certificate checking, much less write my own. Do you
have an example, or know a location on the web that might have one?
Thanks,
Terry
"Carlos C Tapang" <ctapang@.centerus.com> wrote in message news:<u##uaRzmEHA.2680@.TK2MSFTNGP15.phx.gbl>...
> Basically, you have to disable certificate checking for the RM application.
> You do this by writing a custom certificate checker and just ignoring errors
> in that checker. You can make this part of your UILogon code.
> Hope this helps.
> --Carlos
>|||Teo,
Thank you for the reply. I think I have read each of those posts
you link to several times each, to no avail, but I will keep digging
through them.
We are not using client certificates in our application.
I have been trying something different lately - linking to the
reporting service from a different machine using the URL that matches
the one on the certificate we were issued by VeriSign. I think I
managed to get around the "could not established trusted connection"
error, but am now getting SOAP errors. When I get more specific
details, I will post them here.
Thanks against for your continuing assistance.
- Terry
"Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message news:<uWfcNndmEHA.512@.TK2MSFTNGP10.phx.gbl>...
> Terry,
> Check these threads:
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=%22The+underlying+connection+was+closed%3A+Could+not+establish+trust+relationship+%22&btnG=Search
> In addition, if you use client certificates review this:
> (snip)
>|||Terry,
I don't know what it's causing your grief. I have implemented Forms
Authentication over SSL and didn't have a problem. Have you tried create a
sample web service on that box and calling it just to eliminate RS?
--
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/
----
"Terry Romance" <tedgromance@.yahoo.com> wrote in message
news:f284ebe.0409200920.4627cee3@.posting.google.com...
> Teo,
> Thank you for the reply. I think I have read each of those posts
> you link to several times each, to no avail, but I will keep digging
> through them.
> We are not using client certificates in our application.
> I have been trying something different lately - linking to the
> reporting service from a different machine using the URL that matches
> the one on the certificate we were issued by VeriSign. I think I
> managed to get around the "could not established trusted connection"
> error, but am now getting SOAP errors. When I get more specific
> details, I will post them here.
> Thanks against for your continuing assistance.
> - Terry
> "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
news:<uWfcNndmEHA.512@.TK2MSFTNGP10.phx.gbl>...
> > Terry,
> >
> > Check these threads:
> >
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=%22The+underlying+connection+was+closed%3A+Could+not+establish+trust+relationship+%22&btnG=Search
> >
> > In addition, if you use client certificates review this:
> >
> > (snip)
> >|||Teo,
Thanks, I will give that a try, which might not be for awhile -
we just ran into major performance issues. (We had 10 people try to
bring up reports at once, and I think it broke our Forms
Authentication - cookies seemed to disappear!)
Anyway, I hope you'll still be monitoring this when I get back to
checking this issue. Thanks again for all your help.
- Terry
"Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message news:<Od#tw23nEHA.3628@.TK2MSFTNGP09.phx.gbl>...
> Terry,
> I don't know what it's causing your grief. I have implemented Forms
> Authentication over SSL and didn't have a problem. Have you tried create a
> sample web service on that box and calling it just to eliminate RS?
> --
> 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/
> ----
>sql

Forms Authentication WMI

I'm using Forms Authentication win2000 RS/SP2. Can RS make WIN Service Fail?
I get an error when loging into report manager, but when i restart WIN it
would work. Any ideas?Marvin wrote:
> I'm using Forms Authentication win2000 RS/SP2. Can RS make WIN Service Fail?
> I get an error when loging into report manager, but when i restart WIN it
> would work. Any ideas?
There are some:
make ServiceUri variable static, and set it once only.|||cool... next question. Does anyone know why the WMI Service Fails
"pisla oy" wrote:
> Marvin wrote:
> > I'm using Forms Authentication win2000 RS/SP2. Can RS make WIN Service Fail?
> > I get an error when loging into report manager, but when i restart WIN it
> > would work. Any ideas?
> There are some:
> make ServiceUri variable static, and set it once only.
>
>|||Marvin wrote:
> cool... next question. Does anyone know why the WMI Service Fails
> "pisla oy" wrote:
>
>>Marvin wrote:
>>
>>I'm using Forms Authentication win2000 RS/SP2. Can RS make WIN Service Fail?
>>I get an error when loging into report manager, but when i restart WIN it
>>would work. Any ideas?
>>There are some:
>>make ServiceUri variable static, and set it once only.
>>
I guess because of "W" in front...

Forms Authentication without Report Manager

I am intergrating Reporting Services into my own web application and want to use Forms Authentication. Do I need to do anything different than the Security Extension Sample on MSDN books online? Specifically, since I no longer need to go through Report Manager, how would I login the user and manage the cookie?http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp?ferame=true will help you in this. Actualyl I am researching this myself. I am looking to add/delete user roles programmatically. So far, I am having little luck but, I think I'll pull it together!

Forms authentication question

Hi,
The forms authentication works fine. However, after the prescribed timeout
period specified in the report server web.conifg report server autmatically
logs you off even when you are constantly using the report server.
To reproduce:
1. Set the forms auth timeout to a small number say 5 min
2. log on to report manager and access the reports every minute
3. After 5 minutes from logging in the report server rejects the cookie
although you have been actively using it.
Any suggestions?HI.
Sorry, is there any example code about the use of
Forms Auth. and reporting services?
Thanks in advance
S.Bertini
"j_a5" <j_a5@.hotmail.com> wrote in message
news:ORB0pOKpEHA.3848@.tk2msftngp13.phx.gbl...
> Hi,
> The forms authentication works fine. However, after the prescribed timeout
> period specified in the report server web.conifg report server
autmatically
> logs you off even when you are constantly using the report server.
> To reproduce:
> 1. Set the forms auth timeout to a small number say 5 min
> 2. log on to report manager and access the reports every minute
> 3. After 5 minutes from logging in the report server rejects the cookie
> although you have been actively using it.
> Any suggestions?
>|||See the following article that shows how to enable forms authentication
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/ufairs.asp?frame=true#ufairs_topic3
"Sergio Bertini" <sergio.bertini@.RIMUOVIMI.alcatel.it> wrote in message
news:uTDFvTKpEHA.3460@.TK2MSFTNGP15.phx.gbl...
> HI.
> Sorry, is there any example code about the use of
> Forms Auth. and reporting services?
> Thanks in advance
> S.Bertini
> "j_a5" <j_a5@.hotmail.com> wrote in message
> news:ORB0pOKpEHA.3848@.tk2msftngp13.phx.gbl...
> > Hi,
> > The forms authentication works fine. However, after the prescribed
timeout
> > period specified in the report server web.conifg report server
> autmatically
> > logs you off even when you are constantly using the report server.
> > To reproduce:
> > 1. Set the forms auth timeout to a small number say 5 min
> > 2. log on to report manager and access the reports every minute
> > 3. After 5 minutes from logging in the report server rejects the cookie
> > although you have been actively using it.
> > Any suggestions?
> >
> >
>

Monday, March 26, 2012

Forms Authentication and Unattended Report Execution

I have implemented forms authentication security extension as described in the MSDN whitepaper "Using Forms Authentication in Reporting Services" and it works fine. However, I ran into problems trying to create scheduled execution snapshot for a report when it fails with unable to authenticate. How do I configure RS to authenticate for unattended execution with forms authentication?

Thanks,Please disregard this one. Stopping and restarting the ReportServerService resolved the issue.

Forms Authentication and Unattended Report Execution

I have implemented forms authentication security extension as described in the MSDN whitepaper "Using Forms Authentication in Reporting Services" and it works fine. However, I ran into problems trying to create scheduled execution snapshot for a report when it fails with unable to authenticate. How do I configure RS to authenticate for unattended execution with forms authentication?

Thanks,Please disregard this one. Stopping and restarting the ReportServerService resolved the issue.sql

Forms authentication and report publishing from Visual Studio

Hello,
I am using forms authentication to access RS. I can publish reports from the
RS interface, but I somehow can not publish reports from within the VS2000.
It asks me for a password and username and I supply those, but without an
error message it asks me again and again, with no success.
Any ideas on how to publish from VS?
ThanksDid you solve this or anyone else for that matter? I have the sam
problem. :

Forms Authentication + Report Builder 2005

I've got Reporting Services 2005 successfully setup using the forms
authentication extension sample that ships with 2005, and have even got
Report Builder up and running having followed a workaround involving a
HTTP filter
(http://blogs.msdn.com/bimusings/archive/2005/11/29/497848.aspx).
The problem that I have is that I cannot view reports through Report
Builder as any user other than the default administrator, get the error
message:
The permissions granted to user '<formsuser>' are
insufficient for performing this operation. (rsAccessDenied)
Anyone any similar experiences? Any user can create and deploy reports
but it is only the admin that can view reports in Report Builder.
Thanks,
SiThis is exactly the behavior you should see if the user does not have
permission to the Execute Report Definitions system task. This permission is
required to view reports in Report Builder because RB executes the
(potentially modified) report definitions on-the-fly, without saving them to
the report server first.
If you go to Site Settings->Configure Site-wide Security in Report Manager,
you should be able to add your non-admin user to the System User role, which
has permission to the Execute Report Definitions task by default (unless you
upgraded your server from 2000, in which case you will need to add the
permission to the role manually).
Hope this helps!
"si.downes@.gmail.com" wrote:
> I've got Reporting Services 2005 successfully setup using the forms
> authentication extension sample that ships with 2005, and have even got
> Report Builder up and running having followed a workaround involving a
> HTTP filter
> (http://blogs.msdn.com/bimusings/archive/2005/11/29/497848.aspx).
> The problem that I have is that I cannot view reports through Report
> Builder as any user other than the default administrator, get the error
> message:
> The permissions granted to user '<formsuser>' are
> insufficient for performing this operation. (rsAccessDenied)
> Anyone any similar experiences? Any user can create and deploy reports
> but it is only the admin that can view reports in Report Builder.
> Thanks,
> Si
>|||that's fixed it. thanks!
Bob Meyers - MSFT wrote:
> This is exactly the behavior you should see if the user does not have
> permission to the Execute Report Definitions system task. This permission is
> required to view reports in Report Builder because RB executes the
> (potentially modified) report definitions on-the-fly, without saving them to
> the report server first.
> If you go to Site Settings->Configure Site-wide Security in Report Manager,
> you should be able to add your non-admin user to the System User role, which
> has permission to the Execute Report Definitions task by default (unless you
> upgraded your server from 2000, in which case you will need to add the
> permission to the role manually).
> Hope this helps!
> "si.downes@.gmail.com" wrote:
> > I've got Reporting Services 2005 successfully setup using the forms
> > authentication extension sample that ships with 2005, and have even got
> > Report Builder up and running having followed a workaround involving a
> > HTTP filter
> > (http://blogs.msdn.com/bimusings/archive/2005/11/29/497848.aspx).
> > The problem that I have is that I cannot view reports through Report
> > Builder as any user other than the default administrator, get the error
> > message:
> >
> > The permissions granted to user '<formsuser>' are
> > insufficient for performing this operation. (rsAccessDenied)
> >
> > Anyone any similar experiences? Any user can create and deploy reports
> > but it is only the admin that can view reports in Report Builder.
> >
> > Thanks,
> >
> > Si
> >
> >|||Si,
Are you having users access report builder from the internet? When using the
forms authentication is there any loss of features in reporting services? I
thought I read somewhere that if forms authentication was used, either not
all of the features of reporting services were available or you had to
manually do a lot of coding to enable all of the features. I may have
misunderstood the article however.
Thanks,
--
Dan D.
"si.downes@.gmail.com" wrote:
> that's fixed it. thanks!
> Bob Meyers - MSFT wrote:
> > This is exactly the behavior you should see if the user does not have
> > permission to the Execute Report Definitions system task. This permission is
> > required to view reports in Report Builder because RB executes the
> > (potentially modified) report definitions on-the-fly, without saving them to
> > the report server first.
> >
> > If you go to Site Settings->Configure Site-wide Security in Report Manager,
> > you should be able to add your non-admin user to the System User role, which
> > has permission to the Execute Report Definitions task by default (unless you
> > upgraded your server from 2000, in which case you will need to add the
> > permission to the role manually).
> >
> > Hope this helps!
> >
> > "si.downes@.gmail.com" wrote:
> >
> > > I've got Reporting Services 2005 successfully setup using the forms
> > > authentication extension sample that ships with 2005, and have even got
> > > Report Builder up and running having followed a workaround involving a
> > > HTTP filter
> > > (http://blogs.msdn.com/bimusings/archive/2005/11/29/497848.aspx).
> > > The problem that I have is that I cannot view reports through Report
> > > Builder as any user other than the default administrator, get the error
> > > message:
> > >
> > > The permissions granted to user '<formsuser>' are
> > > insufficient for performing this operation. (rsAccessDenied)
> > >
> > > Anyone any similar experiences? Any user can create and deploy reports
> > > but it is only the admin that can view reports in Report Builder.
> > >
> > > Thanks,
> > >
> > > Si
> > >
> > >
>

Forms Authentication

I've successfully set up RS to use Forms Authentication. However, here's
something strange. The first time I access Report Manager (say after a
reboot) and enter the admin credentials, RS churns and churns, then I end up
back at the login screen. If I enter the same credentials again, I get
logged in successfully.
Any one else experience this issue?
ThxAre you using the same server name to access the report server in your
browser as is set in the config files? If not, the cookie won't be getting
through due to cross-(web)domain security.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"FNDS" <absolutelynospam@.nodomain_.com> wrote in message
news:ezRzXl%239EHA.1396@.tk2msftngp13.phx.gbl...
> I've successfully set up RS to use Forms Authentication. However, here's
> something strange. The first time I access Report Manager (say after a
> reboot) and enter the admin credentials, RS churns and churns, then I end
> up back at the login screen. If I enter the same credentials again, I get
> logged in successfully.
> Any one else experience this issue?
> Thx
>|||"Jeff A. Stucker" <jeff@.mobilize.net> wrote in
news:ugC03WC#EHA.3708@.TK2MSFTNGP14.phx.gbl:
> Are you using the same server name to access the report server in your
> browser as is set in the config files? If not, the cookie won't be
> getting through due to cross-(web)domain security.
>
So, how do you address this issue in a hardware load balanced, web farm?
We have a single URL (domain) (ex. http://reporting.xxxxxxx.com/Reports)
but each machine naturally maintains a unique IP that I'm assuming is being
used by each machine when setting the cookie. The web.config files have
matching <machinekey> values to allow for Forms Auth in a web farm but I
don't know how to control the domain of the cookie.

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.
>

Formatting/CR in Report Manager Report Description

Is there any way to format or add a CR to the report description in report manager?

Thanks!

BobP

I'm afraid there is no way of doing this.|||

Ya know... I knew you were going to say that...

Thanks!

Formatting, pdf, and SP2

I have a strange issue that I need help resolving. Basically, the formatting
on a report that I am exporting to pdf changed when I updated my VS to the
SP2 of the Reporting Services. Here's what I am trying to do and what SP2 did:
I have a report that I created that makes address labels. I made it to where
it has three columns, and it fit 10 rows on one page. It worked great, until
I installed SP2. Now, it will only print three across the top of the page,
then move on to the next page.
So, my questions are: 1) should I reinstall pre-SP2 RS so that I can do this
report the way that I had it, or 2) does anyone know of an example that will
help me to do what I had done in the pre-SP2 installation?
Any help would be greatly appreciated!!!It sounds weird, and at least I don't know if this is either caused by the
SP2. But what you can do is redefine your report's margins