Showing posts with label reports. Show all posts
Showing posts with label reports. Show all posts

Friday, March 30, 2012

passing parameter from asp.net application to reporting services report

Hi,

There is a .net application which has a screen with four options(text boxes)

Each of these should take to reports generated by SQL REp Services

This is the requirment

The School selected in the App should be passed on to the report

How should I pass the parameter in my report

so that when user selects a link or text box report for that particular school number is displayed

Thanks

sowree

Are you displaying the report in a report viewer control, or opening up a new browser window with the report URL?

BobP

|||

hi

the report is being viewed using report manager, so the report I have deployed to report server must be displayed when the user selects the menu selecting a school number in the asp app.

I need to know how i pass the parameter in my report rdl 's stored procedure to select the school number selected in the ASP application

Thanks

|||

You would create a parameter in the report rdl to accept the school number, and then use that parameter in the call to the stored proc.

For example: You create a parameter called @.SchoolNumber

exec spgSchoolInfo @.SchooNumber

To pass the parameter to the report in report manager, you would put the school number in the URL: (http://msdn2.microsoft.com/en-US/library/ms153586.aspx)

Example: http://server/reportserver?/Sales/Northwest/Employee Sales Report&rs:Command=Render&SchoolNumber=1234

HTH

BobP

Passing OLAP-parameters between reports

I have to reports, ReportA and ReportB. Both uses datasets that are based on
OLAP cubes. Both reports has parameters and works fine.
My challenge:
When clicking in a field in ReportA, I want to navigate to ReportB, sending
the appropriate parameters from ReportA to ReportB. The first parameter I
send is the value of a fiield "Location", for instance "Seattle". However,
when I send this to reportB (which takes, amongst others, a location
parameter), the value "Seattle" is sent, and not the value which is
understood by ReportB's parameter, that is "[Dim Location].[Location].1".
To accomplsh my task I think I somehow need to print the value "[Dim
Location].[Location].1" in a hidden field in ReportA and send this fields
value to ReportB. But how do get both Seattle and [Dim
Location].[Location].1" as member values of the same OLAP dimension?
Hope I made my self clear enough here. It is a bit difficult to explain, and
don't hesitate to ask me if there is something you didn't understand.
Thanks in advance for your helpYou can return the OLAP dimension member's Unique name in your query, like
this:
with member [Measures].[MyName] as '[Gender].currentmember.name'
member [Measures].[MyLevelOrdinal] as '[Gender].currentmember.Level.Ordinal'
member [Measures].[MyUniqueName] as '[Gender].currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Unit Sales]'
member [Measures].[MyMeasure5] as '[Measures].[Store Cost]'
member [Measures].[MyMeasure6] as '[Measures].[Store Sales]'
select {[Measures].[MyName], [Measures].[MyLevelOrdinal],
[Measures].[MyUniqueName], [Measures].[MyMeasure4], [Measures].[MyMeasure5],
[Measures].[MyMeasure6]} on columns,
{filter([Gender].members, [Measures].[Unit Sales] > 0) } on rows
from [Sales]
(try with Foodmart 2000)
In your case, this should return something like
MyName = Seattle
MyLevelOrdinal = Seattle's level ordinal
MyUniquName = [Dim Location].[Location].1
LIke: member [Measures].[MyUniqueName] as '[Dim
Location].currentmember.UniqueName'
Kaisa M. Lindahl
"Billy" <Billy@.discussions.microsoft.com> wrote in message
news:35966F0A-9112-487A-A8EC-BF6E3F2E39C3@.microsoft.com...
>I have to reports, ReportA and ReportB. Both uses datasets that are based
>on
> OLAP cubes. Both reports has parameters and works fine.
> My challenge:
> When clicking in a field in ReportA, I want to navigate to ReportB,
> sending
> the appropriate parameters from ReportA to ReportB. The first parameter I
> send is the value of a fiield "Location", for instance "Seattle". However,
> when I send this to reportB (which takes, amongst others, a location
> parameter), the value "Seattle" is sent, and not the value which is
> understood by ReportB's parameter, that is "[Dim Location].[Location].1".
>
> To accomplsh my task I think I somehow need to print the value "[Dim
> Location].[Location].1" in a hidden field in ReportA and send this fields
> value to ReportB. But how do get both Seattle and [Dim
> Location].[Location].1" as member values of the same OLAP dimension?
> Hope I made my self clear enough here. It is a bit difficult to explain,
> and
> don't hesitate to ask me if there is something you didn't understand.
> Thanks in advance for your help

Wednesday, March 28, 2012

Passing Multi-Value parameters to a Data Driven Subscription

Hi,

I've been asked to set up a data driven subscription for a number of reports which use multi value parameters. For example, show me all transactions against the following departments: IT, Building Services, Accounts.

As an interactive report it's simple, the user just selects the relevant departments, but as a data driven subscription I can't seem to find the correct format to pass the selections through.

Has anyone tried this before?

Thanks,

Dan

please search on "Multi-Value parameters to a Data Driven Subscription" in this forum.

Passing multiple parameters in CR

hi all i am using Sybase database with crystal reports 10. My problem is, i am not able to pass more than one parameter in the report. when i am trying to pass more than one parameter, i am getting a blank report.

I am able to generate a report when i am passing single parameter on a specific field in the report.

So can any one help me how to pass multiple parameters.

Thanks in advance

Reddy.I think there are no records that matches your parameterssql

Passing multi value parameter to the Drill through report

Hi


I have two reports say Report A and Report B.

Both reports using same parameters.

I am Navigating from Report A to Report B using Jump to Report option.

Now when I pass multiple parameter to the Report B it only displays first parameter results.

In report B I have parameter multi value select to true.

I would like to know if its possible or not to pass multi value parameter in drill through report?

I would appreciate if someone can help me here.

Regards

Amit

Yes you can pass multi value parameters to a drill through report.

It works similar to multi value parameters for subreports, which is discussed in detail in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163803&SiteID=1

-- Robert

|||

Thanks Rob.

That helped.

Passing multi value parameter between reports

I've seen some theads on this but cant seem to get this right. Report A has 5 parameters 2 of them are multi value-- when I click on part of Report A I want to jump to report B and pass all parameter values from report A. The single value ones work but multi value only passes on value and not all values selected-- what am I missing here? Do I need to pass the values in the multi value parameters in an array?

thanks

k

Duuhhhh

someone definelty has a case of the mondays going-- changed =Parameters!code.Value(0) to =Parameters!code.Value

and all is well.

k

Monday, March 26, 2012

Passing mdx parameters to RS through URL (SharePoint Integrated Mode)

Hi there,

I'm running MOSS 2007 in Integrated Mode, and I have a number of reports that are deployed to the Reports Library, and are working just fine when you go there and run them interactively.

Now however, I need to address the report via a URL, and pass it a parameter. Just to add a bit more pain, the report is in mdx, and expects an mdx parameter.

Here is the parameter "prm_cost_centre":

[DIM LEARNER AIM].[COST CENTRE DESC].&[Business]

Here is the URL of the report:

http://vmmoss:88/ReportsLibrary/Report1.rdl

(If you hit that URL as is, it runs fine, using the default parameter)

Now, I know that we have to escape the ampersand, so I'm thinking that this URL should do it.

http://vmmoss:88/ReportsLibrary/Report1.rdl&rs:Command=Render&prm_cost_centre=[DIM LEARNER AIM].[COST CENTRE DESC].%26[Business]

But it doesn't - It throws a 400 Bad Request error.

I know I must be very close, but I just can't work out what URL I need to pass in order to get the damn thing to run.

Any ideas?

I don't have very much experience with MDX params, but I might recommend escaping the periods or possibly the [brackets] too. Sorry I can't offer much more advice than that, but as in any debug scenario, try truncating the param string until you get something that works, then go from there!

|||

It's not possible - you can't pass parameters through the URL when running Reporting Services in Integrated Mode.

http://technet.microsoft.com/en-us/library/bb326290.aspx

How lame is that? All of a sudden, Integrated Mode becomes...worthless to most people, surely.

Passing mdx parameters to RS through URL (SharePoint Integrated Mode)

Hi there,

I'm running MOSS 2007 in Integrated Mode, and I have a number of reports that are deployed to the Reports Library, and are working just fine when you go there and run them interactively.

Now however, I need to address the report via a URL, and pass it a parameter. Just to add a bit more pain, the report is in mdx, and expects an mdx parameter.

Here is the parameter "prm_cost_centre":

[DIM LEARNER AIM].[COST CENTRE DESC].&[Business]

Here is the URL of the report:

http://vmmoss:88/ReportsLibrary/Report1.rdl

(If you hit that URL as is, it runs fine, using the default parameter)

Now, I know that we have to escape the ampersand, so I'm thinking that this URL should do it.

http://vmmoss:88/ReportsLibrary/Report1.rdl&rs:Command=Render&prm_cost_centre=[DIM LEARNER AIM].[COST CENTRE DESC].%26[Business]

But it doesn't - It throws a 400 Bad Request error.

I know I must be very close, but I just can't work out what URL I need to pass in order to get the damn thing to run.

Any ideas?

I don't have very much experience with MDX params, but I might recommend escaping the periods or possibly the [brackets] too. Sorry I can't offer much more advice than that, but as in any debug scenario, try truncating the param string until you get something that works, then go from there!

|||

It's not possible - you can't pass parameters through the URL when running Reporting Services in Integrated Mode.

http://technet.microsoft.com/en-us/library/bb326290.aspx

How lame is that? All of a sudden, Integrated Mode becomes...worthless to most people, surely.

sql

Passing log on info to sub reports

I am trying to access a Crystal report from ASP. This report has a linked sub report. I am able to view the main report from the ASP page. but when i access the sub report i get the error--> Server has not been started. which means that my sub report is not getting the database log on info. i tried passin the info with the code available on net. but the first line itself fails saying Object does not suppot this method. My code is

set crSections=session("oRpt").sections
'if i print the error message here it says object does not support this method.

For Each crSection In crSections
crReportObjects = crSection.ReportObjects

'loop through all the report objects to find all the subreports
For Each crReportObject In crReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then

'you will need to typecast the reportobject to a subreport()
'object once you find it

crSubreportObject = CType(crReportObject, SubreportObject)
'open the subreport object
crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)

'set the database and tables objects to work with the subreport()
crDatabase = crSubreportDocument.Database
crTables = crDatabase.Tables
'loop through all the tables in the subreport and
'set up the connection info and apply it to the tables
For Each crTable In crTables
crTable.SetLogOnInfo "test" , "","test","test"
if crTable.TestConnectivity then
Response.Write "Connecting to sub" ' I am getting this message

end if

Next

End If
Next
Next

please point out what i am doin wrong. Greatly appreciate the help!The culprit is
crSubreportObject = CType(crReportObject, SubreportObject)
i commented this line and it works! :)

Passing in a Parameter by URL but Not displaying in tool bar

Currently we're using an application and the Report Viewer to "view"
our reports. One report that we need to generate is solely based on
the user's SalesRepCode. So what we want is that each user select a
report and then pass there SalesRepCode which we get from the
application, through the query string to Reporting Services to
generate that user's specific report. We don't want to give the user
the ability to use another user's SalesRepCode so we don't specify a
prompt for this parameter in the report parameters dialog boxes. This
is how I'm passing the SalesRepCode value to reporting services (I
know that the query string can be modified so the security on this is
weak. If you have an alternative solution I would love to hear it).
Is there anyway to pass in a parameter and not have it displayed on
the toolbar?
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
This is the error I'm receiving
The report parameter 'SalesRepCode' is read-only and cannot be
modified. (rsReadOnlyReportParameter) Get Online HelpIn order to pass a parameter via the query string but hide it in the toolbar
you will need to be running Reporting Services SP1. This is a new feature
in SP1.
If you have SP1 then edit the parameter properties of the report via the
Report Manager and check "Prompt User" and clear out the value of "Prompt
String" for your SalesRepCode parameter.
--
erik perez
www.solien.com
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> Currently we're using an application and the Report Viewer to "view"
> our reports. One report that we need to generate is solely based on
> the user's SalesRepCode. So what we want is that each user select a
> report and then pass there SalesRepCode which we get from the
> application, through the query string to Reporting Services to
> generate that user's specific report. We don't want to give the user
> the ability to use another user's SalesRepCode so we don't specify a
> prompt for this parameter in the report parameters dialog boxes. This
> is how I'm passing the SalesRepCode value to reporting services (I
> know that the query string can be modified so the security on this is
> weak. If you have an alternative solution I would love to hear it).
> Is there anyway to pass in a parameter and not have it displayed on
> the toolbar?
>
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> This is the error I'm receiving
> The report parameter 'SalesRepCode' is read-only and cannot be
> modified. (rsReadOnlyReportParameter) Get Online Help|||Hey Erik
I installed the SP1 and tried what you suggested. It still doesn't
work. When I go into the reports manager and select my report and
then select parameters from the left side the list of parameters
appears. For my parameter has default is checked but there is no
value in the default text box. Prompt user is unchecked and prompt
string is SalesRepCode:
I still get the same error stating that the parameter is readonly.
"erik perez" <erik.nojunkmail.at.solien.com> wrote in message news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> In order to pass a parameter via the query string but hide it in the toolbar
> you will need to be running Reporting Services SP1. This is a new feature
> in SP1.
> If you have SP1 then edit the parameter properties of the report via the
> Report Manager and check "Prompt User" and clear out the value of "Prompt
> String" for your SalesRepCode parameter.
> --
> erik perez
> www.solien.com
> "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > Currently we're using an application and the Report Viewer to "view"
> > our reports. One report that we need to generate is solely based on
> > the user's SalesRepCode. So what we want is that each user select a
> > report and then pass there SalesRepCode which we get from the
> > application, through the query string to Reporting Services to
> > generate that user's specific report. We don't want to give the user
> > the ability to use another user's SalesRepCode so we don't specify a
> > prompt for this parameter in the report parameters dialog boxes. This
> > is how I'm passing the SalesRepCode value to reporting services (I
> > know that the query string can be modified so the security on this is
> > weak. If you have an alternative solution I would love to hear it).
> > Is there anyway to pass in a parameter and not have it displayed on
> > the toolbar?
> >
> >
> http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> >
> > This is the error I'm receiving
> >
> > The report parameter 'SalesRepCode' is read-only and cannot be
> > modified. (rsReadOnlyReportParameter) Get Online Help|||Ok. Now:
1) Check the "Prompt User" checkbox so it is active
2) Remove the "SalesRepCode" value inside the "Prompt String" text field so
that the field is empty
3) Apply and try feeding the code via the query string.
--
erik perez
www.solien.com
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409020907.14bd20de@.posting.google.com...
> Hey Erik
> I installed the SP1 and tried what you suggested. It still doesn't
> work. When I go into the reports manager and select my report and
> then select parameters from the left side the list of parameters
> appears. For my parameter has default is checked but there is no
> value in the default text box. Prompt user is unchecked and prompt
> string is SalesRepCode:
> I still get the same error stating that the parameter is readonly.
> "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > In order to pass a parameter via the query string but hide it in the
toolbar
> > you will need to be running Reporting Services SP1. This is a new
feature
> > in SP1.
> > If you have SP1 then edit the parameter properties of the report via the
> > Report Manager and check "Prompt User" and clear out the value of
"Prompt
> > String" for your SalesRepCode parameter.
> >
> > --
> > erik perez
> > www.solien.com
> >
> > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > Currently we're using an application and the Report Viewer to "view"
> > > our reports. One report that we need to generate is solely based on
> > > the user's SalesRepCode. So what we want is that each user select a
> > > report and then pass there SalesRepCode which we get from the
> > > application, through the query string to Reporting Services to
> > > generate that user's specific report. We don't want to give the user
> > > the ability to use another user's SalesRepCode so we don't specify a
> > > prompt for this parameter in the report parameters dialog boxes. This
> > > is how I'm passing the SalesRepCode value to reporting services (I
> > > know that the query string can be modified so the security on this is
> > > weak. If you have an alternative solution I would love to hear it).
> > > Is there anyway to pass in a parameter and not have it displayed on
> > > the toolbar?
> > >
> > >
> >
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > >
> > > This is the error I'm receiving
> > >
> > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > modified. (rsReadOnlyReportParameter) Get Online Help|||I'm such an idiot, I should pay more attention to what I write. I
didn't finish my paragraph.
Erik
I did what you said the first time. I removed the text in the "Prompt
String" text field, but when I pressed the "Apply" button I received a
warning for every other text box saying "A value is required." Because
all of my default text boxes were blank. Now I have
calculations/expressions for those default values in my reports so I
didnt' know exactly what to do so just for a test I placed default
values there and tried to submit the value via query string.
Unfortunatly I still receive a read-only error when I submit it. I
have installed the SP, I changed the parameters in the report manager.
Could it be another setting or maybe its machine specific?
"erik perez" <erik.nojunkmail.at.solien.com> wrote in message news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> Ok. Now:
> 1) Check the "Prompt User" checkbox so it is active
> 2) Remove the "SalesRepCode" value inside the "Prompt String" text field so
> that the field is empty
> 3) Apply and try feeding the code via the query string.
> --
> erik perez
> www.solien.com
> "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > Hey Erik
> >
> > I installed the SP1 and tried what you suggested. It still doesn't
> > work. When I go into the reports manager and select my report and
> > then select parameters from the left side the list of parameters
> > appears. For my parameter has default is checked but there is no
> > value in the default text box. Prompt user is unchecked and prompt
> > string is SalesRepCode:
> >
> > I still get the same error stating that the parameter is readonly.
> >
> > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > In order to pass a parameter via the query string but hide it in the
> toolbar
> > > you will need to be running Reporting Services SP1. This is a new
> feature
> > > in SP1.
> > > If you have SP1 then edit the parameter properties of the report via the
> > > Report Manager and check "Prompt User" and clear out the value of
> "Prompt
> > > String" for your SalesRepCode parameter.
> > >
> > > --
> > > erik perez
> > > www.solien.com
> > >
> > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > Currently we're using an application and the Report Viewer to "view"
> > > > our reports. One report that we need to generate is solely based on
> > > > the user's SalesRepCode. So what we want is that each user select a
> > > > report and then pass there SalesRepCode which we get from the
> > > > application, through the query string to Reporting Services to
> > > > generate that user's specific report. We don't want to give the user
> > > > the ability to use another user's SalesRepCode so we don't specify a
> > > > prompt for this parameter in the report parameters dialog boxes. This
> > > > is how I'm passing the SalesRepCode value to reporting services (I
> > > > know that the query string can be modified so the security on this is
> > > > weak. If you have an alternative solution I would love to hear it).
> > > > Is there anyway to pass in a parameter and not have it displayed on
> > > > the toolbar?
> > > >
> > > >
> > >
> http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > >
> > > > This is the error I'm receiving
> > > >
> > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > modified. (rsReadOnlyReportParameter) Get Online Help|||Did you try unchecking the "Has Default" checkboxes for those fields you are
feeding defaults to in the report?
--
erik perez
www.solien.com
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409030527.271c9ada@.posting.google.com...
> I'm such an idiot, I should pay more attention to what I write. I
> didn't finish my paragraph.
> Erik
> I did what you said the first time. I removed the text in the "Prompt
> String" text field, but when I pressed the "Apply" button I received a
> warning for every other text box saying "A value is required." Because
> all of my default text boxes were blank. Now I have
> calculations/expressions for those default values in my reports so I
> didnt' know exactly what to do so just for a test I placed default
> values there and tried to submit the value via query string.
> Unfortunatly I still receive a read-only error when I submit it. I
> have installed the SP, I changed the parameters in the report manager.
> Could it be another setting or maybe its machine specific?
>
> "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> > Ok. Now:
> > 1) Check the "Prompt User" checkbox so it is active
> > 2) Remove the "SalesRepCode" value inside the "Prompt String" text field
so
> > that the field is empty
> > 3) Apply and try feeding the code via the query string.
> >
> > --
> > erik perez
> > www.solien.com
> >
> > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > > Hey Erik
> > >
> > > I installed the SP1 and tried what you suggested. It still doesn't
> > > work. When I go into the reports manager and select my report and
> > > then select parameters from the left side the list of parameters
> > > appears. For my parameter has default is checked but there is no
> > > value in the default text box. Prompt user is unchecked and prompt
> > > string is SalesRepCode:
> > >
> > > I still get the same error stating that the parameter is readonly.
> > >
> > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> > news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > > In order to pass a parameter via the query string but hide it in the
> > toolbar
> > > > you will need to be running Reporting Services SP1. This is a new
> > feature
> > > > in SP1.
> > > > If you have SP1 then edit the parameter properties of the report via
the
> > > > Report Manager and check "Prompt User" and clear out the value of
> > "Prompt
> > > > String" for your SalesRepCode parameter.
> > > >
> > > > --
> > > > erik perez
> > > > www.solien.com
> > > >
> > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > > Currently we're using an application and the Report Viewer to
"view"
> > > > > our reports. One report that we need to generate is solely based
on
> > > > > the user's SalesRepCode. So what we want is that each user select
a
> > > > > report and then pass there SalesRepCode which we get from the
> > > > > application, through the query string to Reporting Services to
> > > > > generate that user's specific report. We don't want to give the
user
> > > > > the ability to use another user's SalesRepCode so we don't specify
a
> > > > > prompt for this parameter in the report parameters dialog boxes.
This
> > > > > is how I'm passing the SalesRepCode value to reporting services (I
> > > > > know that the query string can be modified so the security on this
is
> > > > > weak. If you have an alternative solution I would love to hear
it).
> > > > > Is there anyway to pass in a parameter and not have it displayed
on
> > > > > the toolbar?
> > > > >
> > > > >
> > > >
> >
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > > >
> > > > > This is the error I'm receiving
> > > > >
> > > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > > modified. (rsReadOnlyReportParameter) Get Online Help|||GREAT THAT WORKED!!!! THANKS
BUT now is there any way to pass a parameter without using the query
string. The SalesRepCode I'm trying to pass is sensitive information
and I don't want it in the query string. If you've got any
suggestions I'd love to hear them.
Phoenix
"erik perez" <erik.nojunkmail.at.solien.com> wrote in message news:<##LUp9bkEHA.3872@.TK2MSFTNGP11.phx.gbl>...
> Did you try unchecking the "Has Default" checkboxes for those fields you are
> feeding defaults to in the report?
> --
> erik perez
> www.solien.com
> "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> news:1538bf33.0409030527.271c9ada@.posting.google.com...
> > I'm such an idiot, I should pay more attention to what I write. I
> > didn't finish my paragraph.
> >
> > Erik
> >
> > I did what you said the first time. I removed the text in the "Prompt
> > String" text field, but when I pressed the "Apply" button I received a
> > warning for every other text box saying "A value is required." Because
> > all of my default text boxes were blank. Now I have
> > calculations/expressions for those default values in my reports so I
> > didnt' know exactly what to do so just for a test I placed default
> > values there and tried to submit the value via query string.
> > Unfortunatly I still receive a read-only error when I submit it. I
> > have installed the SP, I changed the parameters in the report manager.
> > Could it be another setting or maybe its machine specific?
> >
> >
> > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> > > Ok. Now:
> > > 1) Check the "Prompt User" checkbox so it is active
> > > 2) Remove the "SalesRepCode" value inside the "Prompt String" text field
> so
> > > that the field is empty
> > > 3) Apply and try feeding the code via the query string.
> > >
> > > --
> > > erik perez
> > > www.solien.com
> > >
> > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > > > Hey Erik
> > > >
> > > > I installed the SP1 and tried what you suggested. It still doesn't
> > > > work. When I go into the reports manager and select my report and
> > > > then select parameters from the left side the list of parameters
> > > > appears. For my parameter has default is checked but there is no
> > > > value in the default text box. Prompt user is unchecked and prompt
> > > > string is SalesRepCode:
> > > >
> > > > I still get the same error stating that the parameter is readonly.
> > > >
> > > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > > > In order to pass a parameter via the query string but hide it in the
> toolbar
> > > > > you will need to be running Reporting Services SP1. This is a new
> feature
> > > > > in SP1.
> > > > > If you have SP1 then edit the parameter properties of the report via
> the
> > > > > Report Manager and check "Prompt User" and clear out the value of
> "Prompt
> > > > > String" for your SalesRepCode parameter.
> > > > >
> > > > > --
> > > > > erik perez
> > > > > www.solien.com
> > > > >
> > > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > > > Currently we're using an application and the Report Viewer to
> "view"
> > > > > > our reports. One report that we need to generate is solely based
> on
> > > > > > the user's SalesRepCode. So what we want is that each user select
> a
> > > > > > report and then pass there SalesRepCode which we get from the
> > > > > > application, through the query string to Reporting Services to
> > > > > > generate that user's specific report. We don't want to give the
> user
> > > > > > the ability to use another user's SalesRepCode so we don't specify
> a
> > > > > > prompt for this parameter in the report parameters dialog boxes.
> This
> > > > > > is how I'm passing the SalesRepCode value to reporting services (I
> > > > > > know that the query string can be modified so the security on this
> is
> > > > > > weak. If you have an alternative solution I would love to hear
> it).
> > > > > > Is there anyway to pass in a parameter and not have it displayed
> on
> > > > > > the toolbar?
> > > > > >
> > > > > >
> > > > >
> > >
> http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > > > >
> > > > > > This is the error I'm receiving
> > > > > >
> > > > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > > > modified. (rsReadOnlyReportParameter) Get Online Help|||If the salesrepcode can be tied to the logged in user you can use the global
variable User!userid and create a query to get the salesrepcode from a
table.
Bruce L-C
"Phoenix" <phoenixsilver@.hotmail.com> wrote in message
news:1538bf33.0409031308.1185e4ca@.posting.google.com...
> GREAT THAT WORKED!!!! THANKS
> BUT now is there any way to pass a parameter without using the query
> string. The SalesRepCode I'm trying to pass is sensitive information
> and I don't want it in the query string. If you've got any
> suggestions I'd love to hear them.
> Phoenix
>
> "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
news:<##LUp9bkEHA.3872@.TK2MSFTNGP11.phx.gbl>...
> > Did you try unchecking the "Has Default" checkboxes for those fields you
are
> > feeding defaults to in the report?
> >
> > --
> > erik perez
> > www.solien.com
> >
> > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > news:1538bf33.0409030527.271c9ada@.posting.google.com...
> > > I'm such an idiot, I should pay more attention to what I write. I
> > > didn't finish my paragraph.
> > >
> > > Erik
> > >
> > > I did what you said the first time. I removed the text in the "Prompt
> > > String" text field, but when I pressed the "Apply" button I received a
> > > warning for every other text box saying "A value is required." Because
> > > all of my default text boxes were blank. Now I have
> > > calculations/expressions for those default values in my reports so I
> > > didnt' know exactly what to do so just for a test I placed default
> > > values there and tried to submit the value via query string.
> > > Unfortunatly I still receive a read-only error when I submit it. I
> > > have installed the SP, I changed the parameters in the report manager.
> > > Could it be another setting or maybe its machine specific?
> > >
> > >
> > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> > news:<e44q8NSkEHA.2340@.TK2MSFTNGP11.phx.gbl>...
> > > > Ok. Now:
> > > > 1) Check the "Prompt User" checkbox so it is active
> > > > 2) Remove the "SalesRepCode" value inside the "Prompt String" text
field
> > so
> > > > that the field is empty
> > > > 3) Apply and try feeding the code via the query string.
> > > >
> > > > --
> > > > erik perez
> > > > www.solien.com
> > > >
> > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > news:1538bf33.0409020907.14bd20de@.posting.google.com...
> > > > > Hey Erik
> > > > >
> > > > > I installed the SP1 and tried what you suggested. It still
doesn't
> > > > > work. When I go into the reports manager and select my report and
> > > > > then select parameters from the left side the list of parameters
> > > > > appears. For my parameter has default is checked but there is no
> > > > > value in the default text box. Prompt user is unchecked and
prompt
> > > > > string is SalesRepCode:
> > > > >
> > > > > I still get the same error stating that the parameter is readonly.
> > > > >
> > > > > "erik perez" <erik.nojunkmail.at.solien.com> wrote in message
> > news:<#vJ2mPFkEHA.1136@.tk2msftngp13.phx.gbl>...
> > > > > > In order to pass a parameter via the query string but hide it in
the
> > toolbar
> > > > > > you will need to be running Reporting Services SP1. This is a
new
> > feature
> > > > > > in SP1.
> > > > > > If you have SP1 then edit the parameter properties of the report
via
> > the
> > > > > > Report Manager and check "Prompt User" and clear out the value
of
> > "Prompt
> > > > > > String" for your SalesRepCode parameter.
> > > > > >
> > > > > > --
> > > > > > erik perez
> > > > > > www.solien.com
> > > > > >
> > > > > > "Phoenix" <phoenixsilver@.hotmail.com> wrote in message
> > > > > > news:1538bf33.0409010922.4b053b0e@.posting.google.com...
> > > > > > > Currently we're using an application and the Report Viewer to
> > "view"
> > > > > > > our reports. One report that we need to generate is solely
based
> > on
> > > > > > > the user's SalesRepCode. So what we want is that each user se
lect
> > a
> > > > > > > report and then pass there SalesRepCode which we get from the
> > > > > > > application, through the query string to Reporting Services to
> > > > > > > generate that user's specific report. We don't want to give
the
> > user
> > > > > > > the ability to use another user's SalesRepCode so we don't
specify
> > a
> > > > > > > prompt for this parameter in the report parameters dialog
boxes.
> > This
> > > > > > > is how I'm passing the SalesRepCode value to reporting
services (I
> > > > > > > know that the query string can be modified so the security on
this
> > is
> > > > > > > weak. If you have an alternative solution I would love to
hear
> > it).
> > > > > > > Is there anyway to pass in a parameter and not have it
displayed
> > on
> > > > > > > the toolbar?
> > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
http://localhost/ReportServer?/IRBReports/InstallationStatus&SalesRepCode=123ShowMe
> > > > > > >
> > > > > > > This is the error I'm receiving
> > > > > > >
> > > > > > > The report parameter 'SalesRepCode' is read-only and cannot be
> > > > > > > modified. (rsReadOnlyReportParameter) Get Online Help

Passing Impersonation through the ReportViewer IFrame?

I am trying to impersonate a user through the web.config of the webapp that
I'm using to view reports. Reports are pulled back through the ReportViewer
object, and so, pulled back through an IFrame.
I impersonate the user which we set up in the report server, so that we can
bypass windows authentication dialog in the webapp and have impersonation do
this for us, so we can go straight into the report. When a user tries to go
to the service directly they get the prompt, and so are restricted. This is
what I'm after.
But, when I hit the report gen button on the Report Viewer it still prompts
for user/pass in a windows dialog. Is impersonation lost through the
IFrame? Does anyone have a better solution?
Appreciated,
Matt SIt sounds like you're creating a custom report manager. The call to the
report URL is separate from the call to the report manager; they are
separate web apps on the same server. In the Microsoft forms authentication
sample code, they deal with this issue by sharing session information
between the report manager and report server via an auth cookie.
I'm not sure exactly how this will apply to your situation, but hopefully
that helps you at least start tracking down the issues. See this article
for more information on the security interaction between the report manager
and report server:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/ufairs.asp
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Matt Swift" <matthewswift@.deletethisbitplshotmail.com> wrote in message
news:OuzKQpd4EHA.1524@.TK2MSFTNGP09.phx.gbl...
>I am trying to impersonate a user through the web.config of the webapp that
> I'm using to view reports. Reports are pulled back through the
> ReportViewer
> object, and so, pulled back through an IFrame.
> I impersonate the user which we set up in the report server, so that we
> can
> bypass windows authentication dialog in the webapp and have impersonation
> do
> this for us, so we can go straight into the report. When a user tries to
> go
> to the service directly they get the prompt, and so are restricted. This
> is
> what I'm after.
> But, when I hit the report gen button on the Report Viewer it still
> prompts
> for user/pass in a windows dialog. Is impersonation lost through the
> IFrame? Does anyone have a better solution?
> Appreciated,
> Matt S
>sql

Passing Formula as a parameter to SQL Query in AddCommand

Hi,

I'am new to Crystal reports,

I created a formula based on that i have to fetch column value from database

for that i wrote a very simple query in SQLCOMMAND

as SELECT <TABLE.CPLUMN> FROM <TABLE>

WHERE <TABLE.OTHERCOLUMN>='@.CRYSTAL REPORT FORMULA'

when closing the commandbox i'am getting error "OLE DB ERROR NO DATABSE RECORDS FOUND"

if i pass a some hardcoded vale(data whic exists in database) then the query is not throwing any error..

Thanks
MikeI don't think you can do that. You can create and use parameters in you query but not formulas. Your query looks really simple, so I have some doubts if it was that necessary to create it in your case.

Why don't you use something like that:

if {TABLE.OTHERCOLUMN}>=here print what you have in your '@.CRYSTAL REPORT FORMULA' then {TABLE.OTHERCOLUMN}

This formula does the same.

Friday, March 23, 2012

Passing default parameters

I have created some reports for our school district and would like to make a
2nd parameters default to what matches the 1st parameter in a drop down list.
Example:
If a teacher selects their school from the parameter drop down listing,
what I am trying to do is so that the teacher does not have to type in their
name and ensure the sysntex is correct, but to have the 2nd parameter default
to all teachers in that school so they could choose from the listing.
I've tried using the school and the teachers in a seperate dataset but when
I then select on the school it shows the school multiple times for each
teacher. I just want the school to appear for it's parameter then the 2nd
parameter would be populated with the teachers names based on the school
selected.
Thanks in Advance
--
Wayne HessThe second parameter should be based on a dataset that accepts the school
and returns the list of teachers.
select distinct firstname + ' ' + lastname as label, teacherid as value from
from schoolteachertable where school = @.SchoolParam
Use this as the source for the second parameter.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Wayne" <Wayne@.discussions.microsoft.com> wrote in message
news:9CB415ED-7050-4073-BACD-836545F0F0E6@.microsoft.com...
>I have created some reports for our school district and would like to make
>a
> 2nd parameters default to what matches the 1st parameter in a drop down
> list.
> Example:
> If a teacher selects their school from the parameter drop down listing,
> what I am trying to do is so that the teacher does not have to type in
> their
> name and ensure the sysntex is correct, but to have the 2nd parameter
> default
> to all teachers in that school so they could choose from the listing.
> I've tried using the school and the teachers in a seperate dataset but
> when
> I then select on the school it shows the school multiple times for each
> teacher. I just want the school to appear for it's parameter then the 2nd
> parameter would be populated with the teachers names based on the school
> selected.
> Thanks in Advance
> --
> Wayne Hess

passing date parameters between reports changing from dd/mm/yyyy to mm/dd/yyyy

I have a report which is based on a start and end date that are passed
as parameters at run time. This works fine. However, in the report is
a link to another report, which needs to run based on the same date
parameters. However, the following happens...
Report 1 runs fine with date parameters and report is generated.
When report 2 is selected the same dates are passed, but the date
format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
report 2 will either run with the wrong dates, or it will crash and not
run at all if swapping month and day gives an invalid date.
I have my report languages set to default so it should pick up my
regional setting ok. But when passing these dates between reports the
settings seem to be lost somehow.
Can anyone help'Check the data settings on the machine, and the report server configuration.
That may be the culprit.
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
<gearoid_healy@.yahoo.com> wrote in message
news:1102350682.082943.295010@.c13g2000cwb.googlegroups.com...
>I have a report which is based on a start and end date that are passed
> as parameters at run time. This works fine. However, in the report is
> a link to another report, which needs to run based on the same date
> parameters. However, the following happens...
> Report 1 runs fine with date parameters and report is generated.
> When report 2 is selected the same dates are passed, but the date
> format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
> report 2 will either run with the wrong dates, or it will crash and not
> run at all if swapping month and day gives an invalid date.
> I have my report languages set to default so it should pick up my
> regional setting ok. But when passing these dates between reports the
> settings seem to be lost somehow.
> Can anyone help'
>|||Oops. Not "data settings" but "date settings", as in Control Panel.
Cheers,
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
news:er8cQd82EHA.4072@.TK2MSFTNGP10.phx.gbl...
> Check the data settings on the machine, and the report server
> configuration. That may be the culprit.
> --
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> <gearoid_healy@.yahoo.com> wrote in message
> news:1102350682.082943.295010@.c13g2000cwb.googlegroups.com...
>>I have a report which is based on a start and end date that are passed
>> as parameters at run time. This works fine. However, in the report is
>> a link to another report, which needs to run based on the same date
>> parameters. However, the following happens...
>> Report 1 runs fine with date parameters and report is generated.
>> When report 2 is selected the same dates are passed, but the date
>> format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
>> report 2 will either run with the wrong dates, or it will crash and not
>> run at all if swapping month and day gives an invalid date.
>> I have my report languages set to default so it should pick up my
>> regional setting ok. But when passing these dates between reports the
>> settings seem to be lost somehow.
>> Can anyone help'
>|||The date settings on my pc are correct. How do I check the report
server configuration? I've taken a look at RSReportServer.config and
the other .config files but can't see anything there that look like
regional settings, apart from
<Render>
<Extension Name=...>
<Configuration>
<OWCConfiguration>
<OWCDownloadLocation
language="en">http://office.microsoft.com/downloads/2002/owc10.aspx</OWCDownloadLocation>
but I don't think this has anything to do with it? Like I said, it
renders fine the first time, but when the dates are passed as part of
the url in a query string to the second report the date format changes,
so it must be some kind of report server configuration setting alright.
I just don't know where to go to check or fix this...|||ok, finally found a solution to this. Apparently it's a known issue
that was addressed in SP1 -
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm
...which states "The rs:ParameterLanguage URL access parameter
alleviates a problem in which culture-sensitive report parameters, such
as dates, times, currency, and numbers, are interpreted using the
browser language"
Basically you have to add
...&rs:ParameterLanguage=<regionalSetting>
where regional setting is en-ie or en-us or whatever...|||Great, thanks for posting your solution back to the newsgroup.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:1102422016.683757.198040@.z14g2000cwz.googlegroups.com...
> ok, finally found a solution to this. Apparently it's a known issue
> that was addressed in SP1 -
> http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm
> ...which states "The rs:ParameterLanguage URL access parameter
> alleviates a problem in which culture-sensitive report parameters, such
> as dates, times, currency, and numbers, are interpreted using the
> browser language"
> Basically you have to add
> ...&rs:ParameterLanguage=<regionalSetting>
> where regional setting is en-ie or en-us or whatever...
>|||I posested my solution to this before I actually tested it. This still
doesn't solve the problem I was having...
I call all my reports through a custom .net application, and display
them in my own application, building up my own URLs to display them.
However, when I link from one report (by clicking on an an image) it
calls the second report. But this is done within the report manager
and as such I don't get the option to append my own parameters to the
query string - namely the &rs:ParameterLanguage=en-ie part that I need.
Can anyone tell me how I might overcome this? I tried adding it as a
parameter in the Image Properties - Navigation - Hyperlink action -
Parameters but got the following error
...Parameter names must be CLS-compliant identifiers.
I'd appreciate a response from someone from Microsoft on this as it's a
known issue. How do I get around this bug in Reporting Services'|||It sounds like you are using Jump to Report. Use Jump to URL. You can put an
expression in Jump to URL that can be anything you want so you should have
no problem appending this onto it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:1102509563.514657.75340@.z14g2000cwz.googlegroups.com...
> I posested my solution to this before I actually tested it. This still
> doesn't solve the problem I was having...
> I call all my reports through a custom .net application, and display
> them in my own application, building up my own URLs to display them.
> However, when I link from one report (by clicking on an an image) it
> calls the second report. But this is done within the report manager
> and as such I don't get the option to append my own parameters to the
> query string - namely the &rs:ParameterLanguage=en-ie part that I need.
> Can anyone tell me how I might overcome this? I tried adding it as a
> parameter in the Image Properties - Navigation - Hyperlink action -
> Parameters but got the following error
> ...Parameter names must be CLS-compliant identifiers.
> I'd appreciate a response from someone from Microsoft on this as it's a
> known issue. How do I get around this bug in Reporting Services'
>|||Thanks Bruce!
Exactly what I was looking for. One slight problem... As I said, I'm
running these reports from a .net app. Is there anyway of reading the
URl of the web server from my web.config for my .net app'|||Use the global variable for this. Here is an example of a working jump to
url expression of mine:
=Globals!ReportServerUrl & "?/Inventory/Similar Loads&Manifest=" &
First(Fields!manifstdocno.Value, "LoadID") &"&WasteIDNum=" &
First(Fields!wasteidnum.Value, "LoadID")
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:1102529644.706986.86770@.z14g2000cwz.googlegroups.com...
> Thanks Bruce!
> Exactly what I was looking for. One slight problem... As I said, I'm
> running these reports from a .net app. Is there anyway of reading the
> URl of the web server from my web.config for my .net app'
>|||brilliant - thanks a million for that Bruce!! Problem sorted.|||I have something to share with everyone for this problem.
If you are using Jump to Report method then to solve this problem simply
format the date you are passing to linked report as "dd-MMM-yyyy" in
paraemeters window.
This worked for me.
Cheers,
Harry
"gearoid_healy@.yahoo.com" wrote:
> I have a report which is based on a start and end date that are passed
> as parameters at run time. This works fine. However, in the report is
> a link to another report, which needs to run based on the same date
> parameters. However, the following happens...
> Report 1 runs fine with date parameters and report is generated.
> When report 2 is selected the same dates are passed, but the date
> format is changed from dd/mm/yyyy to mm/dd/yyyy. And as a result,
> report 2 will either run with the wrong dates, or it will crash and not
> run at all if swapping month and day gives an invalid date.
> I have my report languages set to default so it should pick up my
> regional setting ok. But when passing these dates between reports the
> settings seem to be lost somehow.
> Can anyone help'
>

Passing DataSet to MS Access Report

I have many MS Access reports that process recordsets obtained from a MySQL database, based on a user-selected date range. This uses VBA and input boxes. I'm now creating .aspx pages to get the user input via the web, and am successful in creating a DataSet. My .aspx.vb code includes using Automation to open the Access report in Snapshot Viewer (DoCmd.OutputTo). How do I pass the DataSet to MS Access to replace using recordsets?

My VBA code in Access used to be this:

Code Snippet

Dim ws As Workspace
Dim strConnection As String
Dim dbs As Database

Dim rst_chg As Recordset

Set ws = DBEngine.Workspaces(0)
strConnection = "ODBC;DSN=xxx;DATABASE=xxx;" _
& "SERVER=10.1.144.xxx;" _

& "UID=xxx;PWD=xxx;PORT=xxx;OPTION=0;" _

& "STMT=set wait_timeout=100000;;"


Set dbs = ws.OpenDatabase("", True, True, strConnection)

Set rst_chg = dbs.OpenRecordset("SELECT ...")

'process the recordset ...

I'm thinking I should be able to eliminate most of this code and Set rst_chg = DataSet. I've been successful with using WriteXml in the .aspx.vb page and Application.ImportXML in my VBA to pass the data using XML, but this writes to the hard drive, and also creates a database in Access (overhead I would rather not have to deal with). Again, is there a way to open the DataSet directly in my VBA code?

Thanks,

Guy Rivers

By DataSet you mean ado.net object? If so, I'm afraid there is no way to directly access a managed object from a native VBA script.

Passing DataSet to MS Access Report

I have many MS Access reports that process recordsets obtained from a MySQL database, based on a user-selected date range. This uses VBA and input boxes. I'm now creating .aspx pages to get the user input via the web, and am successful in creating a DataSet. My .aspx.vb code includes using Automation to open the Access report in Snapshot Viewer (DoCmd.OutputTo). How do I pass the DataSet to MS Access to replace using recordsets?

My VBA code in Access used to be this:

Code Snippet

Dim ws As Workspace
Dim strConnection As String
Dim dbs As Database

Dim rst_chg As Recordset

Set ws = DBEngine.Workspaces(0)
strConnection = "ODBC;DSN=xxx;DATABASE=xxx;" _
& "SERVER=10.1.144.xxx;" _

& "UID=xxx;PWD=xxx;PORT=xxx;OPTION=0;" _

& "STMT=set wait_timeout=100000;;"


Set dbs = ws.OpenDatabase("", True, True, strConnection)

Set rst_chg = dbs.OpenRecordset("SELECT ...")

'process the recordset ...

I'm thinking I should be able to eliminate most of this code and Set rst_chg = DataSet. I've been successful with using WriteXml in the .aspx.vb page and Application.ImportXML in my VBA to pass the data using XML, but this writes to the hard drive, and also creates a database in Access (overhead I would rather not have to deal with). Again, is there a way to open the DataSet directly in my VBA code?

Thanks,

Guy Rivers

By DataSet you mean ado.net object? If so, I'm afraid there is no way to directly access a managed object from a native VBA script.

Passing Data From VB to SSRS using LocalReport

With Crystal reports, it was easy to pass a single piece of data from VB to a report in a formula field. How do you implement this functionality in SSRS 2005 (I am using VS 2005)?

Seems like this should be commonplace, but I can't seem to find any info on it.

I am using a LocalReport, so a URL is not an option.

Thanks.

For anyone else having this problem:

I have figured it out - you have to create a parameter using the Report - Report Properties menu. Then, you link the parameter to a TextBox on the report. Finally, you can pass data from a client using the LocalReport.SetParameters method.

Never did find any documentation on it. Very obscure.

Passing Data From VB to SSRS using LocalReport

With Crystal reports, it was easy to pass a single piece of data from VB to a report in a formula field. How do you implement this functionality in SSRS 2005 (I am using VS 2005)?

Seems like this should be commonplace, but I can't seem to find any info on it.

I am using a LocalReport, so a URL is not an option.

Thanks.

For anyone else having this problem:

I have figured it out - you have to create a parameter using the Report - Report Properties menu. Then, you link the parameter to a TextBox on the report. Finally, you can pass data from a client using the LocalReport.SetParameters method.

Never did find any documentation on it. Very obscure.

Wednesday, March 21, 2012

passing credentials from asp.net app to RS

Hello All,

I am embedding reports in a Web Application using the ReportViewer control. The Web Application and the ReportServices reside on different machines on the same network. The settings on the ReportServices IIS are Windows Integrated Authentication and anonymous access is disabled.

When I access the reports from my Web Application, I get windows pop-up asking for credentials. I am using impersonation to pass the credentials to the reporting services. But somehow the credentials are not passed to the report server and the pop-up shows up always. I am trying to get rid of the pop-window. Can somebody help??

Does using any other forms of authentication help?

THanks
Imran

How are you displaying the report in your web app? Just a link, or something different? I'm thinking this might be the double hop problem, so you might want to impersonate a service account that's specific for that report.|||I am displaying the report using the reporviewer control.
I am using impersonation in my web app. The same account also exists in the Report server machine. You are right I think it is a double hop problem. But I dont know how to solve it. I think we should use the Soap method to display the reports instead of the URL Access method
Thanks
Imran|||

With the report viewer impersonation settings don't matter - the report viewer sends the client's browser directly to the report server. Is everyone on the domain? Is the client browser setup to login automatically for the zone the report server is in?

|||

What you need is called Pass Through Authentication. Try the links below for more info. Hope this helps.
http://www.iisanswers.com/articles/enablepassthrough.htm

http://www.codeproject.com/aspnet/PassThroughSecurity.asp

Passing authentication from PHP to reporting services

Hello,

My boss wants me to create a front end webpage for our Reporting
Services reports that customers can log onto through a webform. I'm a
PHP programmer, so I'd rather do this site and the authentication in
PHP than learn .NET. The main problem I see is finding a way to pass
the authentication to Reporting Services so that when a user runs a
report, they are not asked to enter their password a second time.

I don't even know where to start researching this problem... I've asked
in PHP forums and they passed me to you guys. Any ideas?

AndrewIf no one knows the answer to this, does anyone know a better place
that I could ask this question?|||andrewdmason@.gmail.com (andrewdmason@.gmail.com) writes:
> If no one knows the answer to this, does anyone know a better place
> that I could ask this question?

That would be microsoft.public.sqlserver.repotingsvcs.

If your local newserver does not carry it, it's available at
msnews.microsoft.com.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Setup anonymous authentication (instead of NT Challenge Response, the
default) for MS Reporting services and diallow all connections besides
the PHP server and then you don't have to worry about authentication at
all.

Erland Sommarskog wrote:
> andrewdmason@.gmail.com (andrewdmason@.gmail.com) writes:
> > If no one knows the answer to this, does anyone know a better place
> > that I could ask this question?
> That would be microsoft.public.sqlserver.repotingsvcs.
> If your local newserver does not carry it, it's available at
> msnews.microsoft.com.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp