Thursday, March 29, 2012
Getting a list of the queried parameters for a report (via soap)
the standard reportviewer component with queried parameters (eg, values come
from a datasource).
For example Employee Sales Summary in SampleReports includes a field for
employee name/id... which is automatically populated.
When i run GetReportParameters, I end up with nothing other dthan a type.
Thanks
Weston WeemsWeston,
Your code to call GetReportParameters should look similar to this:
bool forRendering = true;
string historyID = null;
ParameterValue[] values = null;
DataSourceCredentials[] credentials = null;
ReportParameter[] parameters = null;
parameters = rs.GetReportParameters(report, historyID, forRendering, values,
credentials);
Then you just have to loop through the ValidValues of parameters.
foreach (ReportParameter parameter in parameters)
{
/// insert code to evaluate which parameter type/name, if dropdown
foreach (ValidValue vv in parameter.ValidValues)
{
LI = new System.Web.UI.WebControls.ListItem(vv.Label, vv.Value);
///see if this value is the same with the default value
///in which case we make the current list item selected
if (vv.Value == parameter.DefaultValues[0] && parameter.State ==ParameterStateEnum.HasValidValue)
{
LI.Selected = true;
}
this.ProcessorID.Items.Add(LI);
}
This code works for the one parameter that I have setup as a query based
parameter in the report.
Hope that helps,
Steve
"Weston Weems" wrote:
> What I'd liek to be able to do is display dropdowns (like the dropdowns in
> the standard reportviewer component with queried parameters (eg, values come
> from a datasource).
> For example Employee Sales Summary in SampleReports includes a field for
> employee name/id... which is automatically populated.
> When i run GetReportParameters, I end up with nothing other dthan a type.
> Thanks
> Weston Weems
>
>sql
Getting a field from subtotal
hi all,
i have a problem in my report; some fields grouped by matrix and include a subtotal. In column group there is 2 field and one of them contain integer values. I want to sum all of the this fields and minus from a rowgroup field. Is there a way for to sum fields in coloumn group or getting total field from subtotal?
I'm having trouble understanding your problem and your English. Could you try to rephrase your question and add a little more detail?
Thanks
Tuesday, March 27, 2012
Getting a cached report on subsequent previews
server. I allow the user to preview the report. If the user creates a
report named 'Test Report', for example, and preview it the first time - all
is fine. If the user makes small changes to the report (say reordering the
ORDER BY in the SQL statement) and keeps the same report name, then
publishes and previews, the report reflecting the latest changes isn't
displayed. The first report is displayed. The user has to hit the refresh
button on the reporting toolbar to get the recently updated report. It's
like I'm getting a cached report because the changes to the report where
minimal. Any way to get around this'
Thx
AdrianAdrian,
I believe there are caching option settings in the System Settings page. You
may want to review this to see if there is an option to fix your issue.
- peteZ
"adrianM" <no_spam@.no_email.org> wrote in message
news:%23Gjq9OVtEHA.904@.TK2MSFTNGP11.phx.gbl...
>I have and application that creates and publishes reports to the Reporting
> server. I allow the user to preview the report. If the user creates a
> report named 'Test Report', for example, and preview it the first time -
> all
> is fine. If the user makes small changes to the report (say reordering
> the
> ORDER BY in the SQL statement) and keeps the same report name, then
> publishes and previews, the report reflecting the latest changes isn't
> displayed. The first report is displayed. The user has to hit the
> refresh
> button on the reporting toolbar to get the recently updated report. It's
> like I'm getting a cached report because the changes to the report where
> minimal. Any way to get around this'
> Thx
> Adrian
>|||For the benefit of the group, in order to avoid the issue mentioned in my
original post you have to add the [rs:ClearSession=true] to the URL.
Adrian
Getting a 404/401 on a long running report
I have a report that I am running through ASP.Net with the rs.render method.
When I have a longer date range, the execution time of the query gets longer
and I start to get funky errors. Namely, at around 3 minutes, I get
prompted for network credentials by the standard IE prompt. It doesn't
accept what they are, and after a few times, it takes me to a 404 saying that
the page can't be found. If I try to cancel the prompt, I get a 401 that I
don't have access. I'm not sure what else to look at here. This report has
worked fine in the past, and there are no problems if I just scale back the
date range.
I have the render make a pdf file in a virtual directory on my web server
and then my postback page has a client script inserted to open a window
showing that pdf file.
Anyone have any ideas?
Dale.I fixed it.
It turns out that the HTTP connection timeout settings needed to be
increased a little bit to allow the report to complete. The default of 120
seconds had worked fine in IIS 5 on Windows 2000 Server, but the same value
in IIS 6 on Windows 2003 Server didn't fare too well.
Also, I wound up re-writing the stored proc for the report. The original
author of it had cursors and correlated subqueries doing things they were
never intended to do. Execution time is now 33s instead of 10m15s.
:-)
"Dale M." wrote:
> Greetings.
> I have a report that I am running through ASP.Net with the rs.render method.
> When I have a longer date range, the execution time of the query gets longer
> and I start to get funky errors. Namely, at around 3 minutes, I get
> prompted for network credentials by the standard IE prompt. It doesn't
> accept what they are, and after a few times, it takes me to a 404 saying that
> the page can't be found. If I try to cancel the prompt, I get a 401 that I
> don't have access. I'm not sure what else to look at here. This report has
> worked fine in the past, and there are no problems if I just scale back the
> date range.
> I have the render make a pdf file in a virtual directory on my web server
> and then my postback page has a client script inserted to open a window
> showing that pdf file.
> Anyone have any ideas?
> Dale.
Getting a .rdl from a ReportBuilder save
I can go to http://localhost/reports not problem
I can create reports no problem using the Report Builder.
My question is: Is there a way of grabbing some sort of .rdl file or
something of that report so I can publish it to another server? After
I save the report I cannot find it anywhere.
Using the Report builder is way simpler than building reports in a VS
report project.
Is there something I am missing? Can you build .rdls in VS using the
same simple UI that is in Report Builder?
Thanks,
BillBill,
By default the report builder will save the RDLin Reporting Services in the
folder where your model is located. You can navigate to this folder via the
Report Manager Website (http://{server}/Reports), navigate to where your
model is located and your RDL should be there.
OR
You can save the RDL to your local hard drive through the Report Builder
application via the File \ Save To File and specify on your local hard drive
where u'd like to save the RDL.
Hope this helps.
-Rick
"bill" wrote:
> I have created and deployed a report model.
> I can go to http://localhost/reports not problem
> I can create reports no problem using the Report Builder.
> My question is: Is there a way of grabbing some sort of .rdl file or
> something of that report so I can publish it to another server? After
> I save the report I cannot find it anywhere.
> Using the Report builder is way simpler than building reports in a VS
> report project.
> Is there something I am missing? Can you build .rdls in VS using the
> same simple UI that is in Report Builder?
> Thanks,
> Bill
>
Getting 404 when trying to run http://localhost/reports
have you successfully deployed your report server? (in vs, from the solution explorer, right click your project and select 'Deploy')
Getting 20533 Error as a result of subreports.
I have created a report which works fine on my dev machine and am trying to deploy to another machine.
When the report is run on the other machine an error 20533 Unable to open database error is received.
The report has an embedded subreport, which if I remove the subreport, works fine.
I have validated the database for both the main report and the subreport.
Here is the code I am using to run the report.
With MDIMain.CrystalReport
.ReportFileName = App.Path & "\reports\Summary.rpt"
.RetrieveDataFiles
Do Until .DataFiles(xCntr) = ""
.DataFiles(xCntr) = gSystem.DB_Path
xCntr = xCntr + 1
Loop
.SelectionFormula = "{OrderHeader.OrderID} =" & rsOrder("OrderID") '{?OrderID}
.ReportTitle = gSystem.Company_Name
.Action = 1
End With
I'm at a loss... any help would be apprieciated. Thanks.Hi all... I figured out what the issue was. It was fixed with the following code that sets the database location for the subreport.
I have posted the code fix for anyone else that may run into this issue.
Thanks to all that took a look at this for me.
With MDIMain.CrystalReport
.ReportFileName = App.Path & "\reports\Summary.rpt"
.RetrieveDataFiles
Do Until .DataFiles(xCntr) = ""
.DataFiles(xCntr) = gSystem.DB_Path
xCntr = xCntr + 1
Loop
.SelectionFormula = "{OrderHeader.OrderID} =" & rsOrder("OrderID")
.ReportTitle = gSystem.Company_Name
.SubreportToChange = "Selected Options"
.DataFiles(0) = gSystem.DB_Path
.SubreportToChange = ""
.Action = 1
End With
Monday, March 26, 2012
Getting #Error details from deployed report
I have a report that displays #Error for some field values when deployed on the server. Is there any way to get details on the error?
Thanks.
Most likely the #Error comes from making a call into a custom assembly and insufficient security permissions for that custom assembly to be invoked.
You can partially simulate the server environment, if you run the report in the stand-alone preview of report designer. I.e. instead of clicking on the Preview tab, hit F5 which should open a new window for the stand-alone preview. For the #Error you should get warning messages with more details in the output window.
-- Robert
GetScheduleProperties()
string id = service.CreateSubscription(reportName, extensionSettings,
description, eventType,matchDataParam, parameters );
I get the id back and store it in the database. When I try to pass the id
to GetScheduleProperties() I get the following error:
"The schedule '7acaf6e8-8cb5-499b-b052-c57d3f0b20a6' cannot be found. The
schedule identifier that is provided to an operation cannot be located in
the report server database. "
What's going on? I looked in the Subscriptions table in the ReportServer
database and I see the subscription ID there...You want to call GetSubscriptionProperties, not GetScheduleProperties.
GetScheduleProperties returns information about shared schedules only.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"FNDS" <absolutelynospam@.nodomain_.com> wrote in message
news:%23lBbzT65EHA.2180@.TK2MSFTNGP12.phx.gbl...
>I create a report subscription in code. Everything works fine:
> string id = service.CreateSubscription(reportName, extensionSettings,
> description, eventType,matchDataParam, parameters );
> I get the id back and store it in the database. When I try to pass the id
> to GetScheduleProperties() I get the following error:
> "The schedule '7acaf6e8-8cb5-499b-b052-c57d3f0b20a6' cannot be found. The
> schedule identifier that is provided to an operation cannot be located in
> the report server database. "
> What's going on? I looked in the Subscriptions table in the ReportServer
> database and I see the subscription ID there...
>
GetReportParameters method not updating ReportParameters array.
and 'end date'). I then introduced a third parameter ('Range') which
provides a difinitive list of integer values to select from.
On selecting one of the integer values from the 'Range' parameter, the
'start date' and 'end date' are updated accordingly (by applying
"=Code.GetStartDate(Parameters!Range.Value)" as the non-queried Default
Values of the 'start date' parameter properties, and similar for the 'end
date'). This works perfectly when run from the Report Manager (i.e. If I
select the third option (last month) from the 'Range' parameter, the code
will update the 'start date' value to the beginning of last month and the
'end date' value to the last day of last month).
I have also developed a C# user control that acts as a client side utility
for viewing reports on a specific server (using the Reporting Services
WebService provided). This applicatiuon works perfectly for all reports
with the exception of that described above. The problem lies in obtaining
the updated dates when selecting a 'Range' using the 'GetReportParameters'
method. I have no problem returning updated parameter values from Query
Dependant parameters, which causes me to believe that I am calling the
Method correctly, however the 'start date' and 'end date' default values do
not seem to be updated by the webservice despite passing the updated value
of the 'Range' parameter to the method.
Any information as to why the parameter values are not being updated
correctly would be helpful.
Below is a code snippet:
Thanks in advance.
----
ReportServer.ReportParameter[] parameters;
try
{
parameters = rs.GetReportParameters("/" +
reportPath,null,true,currentParamValues,null);
}
catch(System.Web.Services.Protocols.SoapException sex)
{
SoapException(sex);
return null;
}
----I am seeing something similar, only with a cascading parameter. I've
stripped it down to the simplest example I can think of... the report has 2
parameters, A and B. B has a valid values list based on a dataset that
requires A.
I call GetReportParameters( ReportName, false, null, null, null ) and both
parameters come back with parameter 2 dependent upon parameter 1. I then
provide a ParameterValue array with 1 entry for parameter A. I call
GetReportParameters( ReportName, true, null, parameterValues, null ) and I
get both parameters back but B has no valid values and the parameter's state
is HasOutstandingDependencies.
Have you determined what your parameter's state is after the
GetReportParameters call?
"Paul B" wrote:
> I have developed a report that uses two 'datatime' parameters ('start date'
> and 'end date'). I then introduced a third parameter ('Range') which
> provides a difinitive list of integer values to select from.
> On selecting one of the integer values from the 'Range' parameter, the
> 'start date' and 'end date' are updated accordingly (by applying
> "=Code.GetStartDate(Parameters!Range.Value)" as the non-queried Default
> Values of the 'start date' parameter properties, and similar for the 'end
> date'). This works perfectly when run from the Report Manager (i.e. If I
> select the third option (last month) from the 'Range' parameter, the code
> will update the 'start date' value to the beginning of last month and the
> 'end date' value to the last day of last month).
> I have also developed a C# user control that acts as a client side utility
> for viewing reports on a specific server (using the Reporting Services
> WebService provided). This applicatiuon works perfectly for all reports
> with the exception of that described above. The problem lies in obtaining
> the updated dates when selecting a 'Range' using the 'GetReportParameters'
> method. I have no problem returning updated parameter values from Query
> Dependant parameters, which causes me to believe that I am calling the
> Method correctly, however the 'start date' and 'end date' default values do
> not seem to be updated by the webservice despite passing the updated value
> of the 'Range' parameter to the method.
> Any information as to why the parameter values are not being updated
> correctly would be helpful.
> Below is a code snippet:
> Thanks in advance.
> ----
> ReportServer.ReportParameter[] parameters;
> try
> {
> parameters = rs.GetReportParameters("/" +
> reportPath,null,true,currentParamValues,null);
> }
> catch(System.Web.Services.Protocols.SoapException sex)
> {
> SoapException(sex);
> return null;
> }
> ----
>
>sql
GetReportParameters -> 400 - Bad Request
I want to iterate throught the parameter collection of a report on a report
server running in sharepoint integration mode. To do that I use this code:
ReportingService2006 rs = new ReportingService2006();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
foreach (ReportParameter parameter in
rs.GetReportParameters(ConfigurationManager.AppSettings["RS_ReportParameters"],
null, null, null))
{
Response.Write(parameter.Name);
}
Where RS_ReportParameters is like this in the web.config:
<add key="RS_ReportParameters"
value="http://intranet/sitedirectory/rapportage/rapporten/testvoorparameters.rdl"/>
This gives me a 400 - Bad Request error.
Does anyone know how to solve this' Running the actual report goes well...
Best regards,
PeterSome more information:
when I use this URL for the webservice:
http://vpc-ssrs:8080/ReportServer/ReportService2006.asmx
I get: The request failed with HTTP status 401: Unauthorized
When I use this:
http://vpc-ssrs/_vti_bin/ReportServer/ReportService2006.asmx
I get: Bad request and also other methods don't work.
So how do solve this 401 error?
Best regards,
Peter
-- Original Message --
From: "Peter" <peter@.giessen.remthisfornospam.nl>
Newsgroups: microsoft.public.sqlserver.reportingsvcs
Sent: Tuesday, November 06, 2007 10:46 AM
Subject: GetReportParameters -> 400 - Bad Request
> Hello,
> I want to iterate throught the parameter collection of a report on a
> report server running in sharepoint integration mode. To do that I use
> this code:
>
> ReportingService2006 rs = new ReportingService2006();
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> foreach (ReportParameter parameter in
> rs.GetReportParameters(ConfigurationManager.AppSettings["RS_ReportParameters"],
> null, null, null))
> {
> Response.Write(parameter.Name);
> }
> Where RS_ReportParameters is like this in the web.config:
> <add key="RS_ReportParameters"
> value="http://intranet/sitedirectory/rapportage/rapporten/testvoorparameters.rdl"/>
> This gives me a 400 - Bad Request error.
> Does anyone know how to solve this' Running the actual report goes
> well...
> Best regards,
> Peter|||Nevermind, solved it... thanks for reading anyway ;)
"Peter" <peter@.giessen.remthisfornospam.nl> wrote in message
news:6D4F92F8-9BFC-4C1B-9C29-BEC328685CB4@.microsoft.com...
> Some more information:
>
> when I use this URL for the webservice:
> http://vpc-ssrs:8080/ReportServer/ReportService2006.asmx
> I get: The request failed with HTTP status 401: Unauthorized
> When I use this:
> http://vpc-ssrs/_vti_bin/ReportServer/ReportService2006.asmx
> I get: Bad request and also other methods don't work.
> So how do solve this 401 error?
> Best regards,
> Peter
> -- Original Message --
> From: "Peter" <peter@.giessen.remthisfornospam.nl>
> Newsgroups: microsoft.public.sqlserver.reportingsvcs
> Sent: Tuesday, November 06, 2007 10:46 AM
> Subject: GetReportParameters -> 400 - Bad Request
>
>> Hello,
>> I want to iterate throught the parameter collection of a report on a
>> report server running in sharepoint integration mode. To do that I use
>> this code:
>>
>> ReportingService2006 rs = new ReportingService2006();
>> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
>> foreach (ReportParameter parameter in
>> rs.GetReportParameters(ConfigurationManager.AppSettings["RS_ReportParameters"],
>> null, null, null))
>> {
>> Response.Write(parameter.Name);
>> }
>> Where RS_ReportParameters is like this in the web.config:
>> <add key="RS_ReportParameters"
>> value="http://intranet/sitedirectory/rapportage/rapporten/testvoorparameters.rdl"/>
>> This gives me a 400 - Bad Request error.
>> Does anyone know how to solve this' Running the actual report goes
>> well...
>> Best regards,
>> Peter
>
GetReportParameters - How can I get the default value of the parameter?
I can get the name, type, etc., but I'm unsure of how to get the actual
value assigned to that parameter.
Any suggestions?Hi Bob:
See my article:
Using GetReportParameters in Reporting Services
http://odetocode.com/Articles/123.aspx
HTH,
--
Scott
http://www.OdeToCode.com
n Wed, 15 Sep 2004 16:48:01 -0600, "Bob Thomas" <bobthomas@.yahoo.com>
wrote:
>I'm using the GetReportParameters method to get the parameters of my report.
>I can get the name, type, etc., but I'm unsure of how to get the actual
>value assigned to that parameter.
>Any suggestions?
>
Geting the report url
Is there a way in a report to get his url?
I'll explain what i want to do: I want to add an option to export the report to excel format with out useing the menu so i want to add a button (or a table cell) and give him,in the nevigation field, the same url of the rreport with the same parameters but add to him the command "rs:format=excel" and then by pressing the button it will automaticly export my report.
Thanks.I thought it was an easy one :)
If my question is not clear enough, please let me know.
Thanks.|||
Craft a URL like this:
http://localhost/reportserver?/ReportProject1/Report&rs:Command=Render&rs:Format=EXCEL
Documented at http://msdn2.microsoft.com/en-us/library/ms153586.aspx.
Thanks, Donovan
Friday, March 23, 2012
Geting report url inside the report
Is there a way in a report to get his url?
I'll explain what i want to do: I want to add an option to export the report to excel format with out useing the menu so i want to add a button (or a table cell) and give him,in the nevigation field, the same url of the rreport with the same parameters but add to him the command "rs:format=excel" and then by pressing the button it will automaticly export my report.
Thanks
From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comi was sure this is an easy one :)
if my question wasn't clear enough, please let me know.
Thanks in advance/
Wednesday, March 21, 2012
Get/SetExecutionOptions question
are available via Report Manager? As far as I can see I can set a report to
Live or Snapshot and set a schedule if Snapshot. How do I retrieve the
setting " Cache a temporary copy of the report. Expire copy of report after
a number of minutes" for example ? This comes back as
ExecutionSettingEnum.Live but I can't see how to get the number of minutes?
Same if the expiry is based on a schedule - it does not get populated when
Live. I need to script these settings but can't see how to do this?
--
Cheers,
JasIf execution is set to Live, use GetCacheOptions method to get expiration
definition:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_3cq8.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:%23FuGijFFFHA.2572@.tk2msftngp13.phx.gbl...
> Can Get/SetExecutionOptions really get/set all the Execution properties
> that are available via Report Manager? As far as I can see I can set a
> report to Live or Snapshot and set a schedule if Snapshot. How do I
> retrieve the setting " Cache a temporary copy of the report. Expire copy
> of report after a number of minutes" for example ? This comes back as
> ExecutionSettingEnum.Live but I can't see how to get the number of
> minutes? Same if the expiry is based on a schedule - it does not get
> populated when Live. I need to script these settings but can't see how to
> do this?
> --
> Cheers,
> Jas
>
>|||Perfect, I completely missed that method :-)
--
Cheers,
Jas
"Lev Semenets [MSFT]" <levs@.microsoft.com> wrote in message
news:OdPCASLFFHA.3972@.TK2MSFTNGP15.phx.gbl...
> If execution is set to Live, use GetCacheOptions method to get expiration
> definition:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_3cq8.asp
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:%23FuGijFFFHA.2572@.tk2msftngp13.phx.gbl...
>> Can Get/SetExecutionOptions really get/set all the Execution properties
>> that are available via Report Manager? As far as I can see I can set a
>> report to Live or Snapshot and set a schedule if Snapshot. How do I
>> retrieve the setting " Cache a temporary copy of the report. Expire copy
>> of report after a number of minutes" for example ? This comes back as
>> ExecutionSettingEnum.Live but I can't see how to get the number of
>> minutes? Same if the expiry is based on a schedule - it does not get
>> populated when Live. I need to script these settings but can't see how to
>> do this?
>> --
>> Cheers,
>> Jas
>>
>
Get Year
In my report i have a parameter which displays the Year like this:2000,2001,..,2006.
When it is '1/1/2007' 2007 is automatically need to be add to Year parameter.This should automatically populate with each new year.
How to write the code for achieving this.
Thanks in advance
This 'should' provide the year for you.
SELECT year( getdate() )
|||Hi,
I did this with this query:
Create Procedure rptCaseDetail_GetYear
as
Begin
Declare @.Year int
Set @.year=2000
Declare @.Current int
SET @.Current=Year(getdate())
declare @.jyear table
(
Year int
)
While (@.year<=@.Current)
Begin
insert into @.jyear Values( @.year)
SET @.Year=@.year+1
End
select * from @.Jyear order by year desc
End
|||I would create a function as it it easier to handle, joinable and more reusable:ALTER FUNCTION dbo.NextYears
(
@.StartingYear SMALLINT,
@.AmountOfYears SMALLINT
)
RETURNS @.NextYears TABLE
(
TheYear SMALLINT
)
AS
BEGIN
WHILE @.AmountOfYears >= 0
BEGIN
INSERT INTO @.NextYears
SELECT @.StartingYear + @.AmountOfYears
SET @.AmountOfYears = @.AmountOfYears -1
END
RETURN
END
HTh, Jens K. Suessmeyer.http://www.sqlserver2005.de
Monday, March 19, 2012
Get value from Report
any field from the report. I currently have a windows application with an IE
web control embedded in the windows form. How can I get the value of a
selected field in the report outside of reporting services? Is it possible to
create a web service and pass the value over to it and retrieve it that way
or is there a better way to do this? Thanks for any input.I am not sure what you want to do here. If you want the value of a
selected field from your app to be passed to a report you can pass it
as a parameter to the report.
if you want a value from the report to be passed into your app then you
can pass the value from your report into a custom assembly, which you
can use in your app.|||I would like the value passed from the report to the calling app. Can you
point me to any examples (preferably c#) re. passing values from report into
a custom assembly? Thanks.
"RN" wrote:
> I am not sure what you want to do here. If you want the value of a
> selected field from your app to be passed to a report you can pass it
> as a parameter to the report.
> if you want a value from the report to be passed into your app then you
> can pass the value from your report into a custom assembly, which you
> can use in your app.
>|||The custom assembly would be a C# project with a method in it that
accepts the value you want to pass to your app, which you can save in a
global variable or collection and use in your app. Please refer to
Custom Assemblies in books online for information about how to
reference this assembly in your report and how to call methods in it.
El Presidente wrote:
> I would like the value passed from the report to the calling app.
Can you
> point me to any examples (preferably c#) re. passing values from
report into
> a custom assembly? Thanks.
> "RN" wrote:
> > I am not sure what you want to do here. If you want the value of a
> > selected field from your app to be passed to a report you can pass
it
> > as a parameter to the report.
> > if you want a value from the report to be passed into your app then
you
> > can pass the value from your report into a custom assembly, which
you
> > can use in your app.
> >
> >
Get UserName of Windows Account for Report Parameter
We would like to automatically pass the username as a parameter to reports. By username, I mean the username from the Windows account used to access the virtual directory containing the report (which uses Integrated Windows Authentication). Sort of like the User.Identity.Name property in ASP.NET. Is this going to be possible?
Thanks
Hi ALFKI.Have you tried Globasl!UserID? ...or was it User!UserID?...damn, it slipped my mind; but I guess it'll help you.
Regards|||
User!UserID has the fully qualified user name, i.e. MYDOMAIN\MyUserName
HTH...
--
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811
I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)
Get user syntax
user who is running the report. What would this syntax look like? I thought
it was getuser(), but no luck there.
Thanks,
Ryan
Ryan,
Depending on whether you want a User or a Login, you can try one of the
following: CURRENT_USER, SYSTEM_USER, USER_NAME, SUSER_SNAME. Check them
out in the Books Online, or just run them and choose what you prefer to use.
RLF
"Ryan Mcbee" <RyanMcbee@.discussions.microsoft.com> wrote in message
news:266EBEEE-3FB5-448D-A58B-0EF6D8F006F1@.microsoft.com...
>I am building a view for a report and one of the requirements is to grab
>the
> user who is running the report. What would this syntax look like? I
> thought
> it was getuser(), but no luck there.
> Thanks,
> Ryan
Monday, March 12, 2012
Get Toggle state at report runtime
I would like to find the toggle state of a textbox in the report to set an
expression according to that state. I need to navigate to a second report
with different parameters according to the toggle state of a particular row
in my report. How do I write the expression (something like iif(toggle state
= 'Collapsed', Parameter A, Parameter B))?
Thanks,
Ronen FidelHello Ronen,
Unfortunatly, you could not refer the visability state of an report item in
the expression.
I would like to know your business more detailed that I may provide a
solution instead of refer the visability.
Here is an example which have a conditional background color by the toggle
state.
Maybe this will be some help for you.
http://www.msbicentral.com/Downloads/tabid/96/Default.aspx
DrillDownSample.RDL
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Wei,
I'll add more details:
I created a matrix report. I created a group by on the row cell and added
navigation expression on the data cell. When the row cell is expanded the
drill through works fine since I send the row cell id as parameter to the
next report. When the row cell in collapsed, the data cell shows the sun of
all data correctly but the drill through is not working as it should since
the parameter value that it pass to the second report is the first value of
the grouped by data. I wanted to get the toggled state and then if it is
collapsed then send 'ALL' in the parameter and when it is expanded send the
row id.
Thanks,
Ronen Fidel
Unisfair
"Wei Lu [MSFT]" wrote:
> Hello Ronen,
> Unfortunatly, you could not refer the visability state of an report item in
> the expression.
> I would like to know your business more detailed that I may provide a
> solution instead of refer the visability.
> Here is an example which have a conditional background color by the toggle
> state.
> Maybe this will be some help for you.
> http://www.msbicentral.com/Downloads/tabid/96/Default.aspx
> DrillDownSample.RDL
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>|||Hello Ronen,
To understand your issue better and try to reproduce this issue, I would
like to get some sample report from you.
You could send the report file to me. To get my email address, please
remove the ONLINE in my email.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Wei,
I sent you the reprt via email.
Thanks,
Ronen Fidel
Unisfair
"Wei Lu [MSFT]" wrote:
> Hello Ronen,
> To understand your issue better and try to reproduce this issue, I would
> like to get some sample report from you.
> You could send the report file to me. To get my email address, please
> remove the ONLINE in my email.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>