Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts

Friday, March 30, 2012

problem with cascading parameters after CTP2

In the standard report manager I'm running a report with 5 parameter choices. The first 3 are determinants of the 4th, and the combined 1-4 determine the 5th.

Although this works fine in my VS BIDS (sp1) with SQL 2005 sp2 CTP, when I deploy it to my sp2 CTP Report server, it throws an error as soon as I select the 3rd parameter.

One or more data sources is missing credentials

I found this answer from MS in another thread (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=923684&SiteID=1) and since it deals with my problem, wanted to pass it along to anyone else that is dealing with this problem.

" This is a known regression with CTP2 that will be fixed before SP2 is released. The problem is not specific to multivalue parameters. It has to do with dependencies between parameters.

In some cases, you can work around the issue if you give the dependent parameter a default value. You can also work around the issue by removing the valid values dependency between the parameters, though this may not be possible for a given report."

The suggested workaround does work! I can get beyond the 3rd parameter now because I applied a default value!

The workaround is useless. It only alleviated the problem when I stayed with that default value for my 3rd parameter. As soon as I changed it I'm right back to the 'one or more data sources is missing credentials'

SP2 cannot be soon enough...

|||

The workaround suggested can work, but it's tricky, especially with nested parameters that are dependent on each other. I finally got a six parameter functional again but with some pain. I made all the dependent parameter lists 'multi-select' and gave them a functional default value. Only then do they populate correctly.

And this all because I was hoping to use these reports in WSS 3.0 with the report server addin. Got very close and now have stumbled across similar bug with multiple parameters in Sharepoint. Will post entry to Sharepoint forums.

sql

Friday, March 23, 2012

problem with add money value from text box to SQL table

Hi...

I have problem with add money value from text box to SQL table

This is my statment

cmd.Parameters.Add(

"@.minbid", Data.SqlDbType.SmallMoney)

cmd.Parameters.Add(

"@.minIncrement", Data.SqlDbType.SmallMoney)

can any one help meCrying [:'(]

You might want to "describe" what the problem is. Perhaps post the error message?|||

Hi..

Tanke you for reply ...I think the problem is when the user enter to the text box int value ..

ex:

min bid = 100 --> The user inter it

I think to solve the problem is to format the user input to money value ...but how I do that

pleaze if any one have a solution to reply please as soon as posiple.

thanks alot

Wednesday, March 21, 2012

problem with a date parameter in ASP.Net page

The date format in the 'weekending' textbox is 5/5/2007
Here's what I've got:

With cmd.Parameters
.Add(New SqlParameter("@.SQLweekending", SqlDbType.DateTime,weekending.Text))
the error message is:
"Conversion from string "4/8/2007" to type 'Integer' is not valid."

Then, I tried:
.Add(

New SqlParameter("@.SQLweekending", SqlDbType.DateTime,CDate(weekending.Text)))

but, before I even tried it, it gave me a blue squiggly line, with an error message:
"Error 2 Value of type 'Date' cannot be converted to 'Integer'"

How can I get this to work?

Hi,

What is the data type for yourSQLweekending column in your table? Is it a DateTime column or Integer type? You need a DateTime column for this.

|||Nope - it's datetime also|||

Here is sample in VB.NET that inserts date to a datetime column:

Dim MySQLAsString ="Insert into Dates (id, tDate) values (@.id, @.tDate)"Dim myConnAs SqlConnection =New SqlConnection(ConfigurationManager.ConnectionStrings("forumConnectionString").ConnectionString.ToString())Dim CmdAsNew SQLCommand(MySQL, MyConn)

Cmd.Parameters.Add(

New SqlParameter("@.id", txtid.Text))

Cmd.Parameters.Add(

New SqlParameter("@.tDate",txttDate.Text))

MyConn.Open()

cmd.ExecuteNonQuery()

MyConn.Close()sql

Problem with 2 Dataset Sharing Parameters

I have a report that will pull out a list of bugs assigned to users for a
period of time (@.StartDate, @.EndDate). Optionally the report has option to
select a single user (@.UserName) or just all of them. There are 2 datasets.
First dataset: Bugs requires 3 parameters: @.StartDate, @.EndDate, @.UserName.
Second dataset: UserName. At first I have a query to list all users. Since
the list has hundreds of users while the result set from dataset Bugs mostly
has less than 10 users, I built another query to list only users having bugs
assigned from @.StartDate to @.EndDate. So it requires 2 parameters @.StartDate
and @.Enddate.
Now both datasets use @.StartDate and @.EndDate. The list to select for
@.UserName is produced after @.StartDate and @.EndDate are entered. I expected
the report to let me select the username after I enter @.StartDate and
@.EndDate. However in the preview tab right at the moment when I clicked on
the box for @.EndDate to enter a value the program hang up (VS 2003). I
uploaded it to a report server to see how it behaves then I got this error
after I click on the EndDate box: The value provided for the report
parameter 'EndDate' is not valid for its type.
(rsReportParameterTypeMismatch).
I don't know what's wrong. If I change the dataset UserName to list all
users (no parameter required) then the report runs fine. I use Visual
Studio .NET 2003 Service Pack 1, report server is SQL 2000 with latest SP on
the O/S, SQL, and SQL RS.
An thought?
Thanks.On May 2, 5:31 pm, "ME" <M...@.mail.com> wrote:
> I have a report that will pull out a list of bugs assigned to users for a
> period of time (@.StartDate, @.EndDate). Optionally the report has option to
> select a single user (@.UserName) or just all of them. There are 2 datasets.
> First dataset: Bugs requires 3 parameters: @.StartDate, @.EndDate, @.UserName.
> Second dataset: UserName. At first I have a query to list all users. Since
> the list has hundreds of users while the result set from dataset Bugs mostly
> has less than 10 users, I built another query to list only users having bugs
> assigned from @.StartDate to @.EndDate. So it requires 2 parameters @.StartDate
> and @.Enddate.
> Now both datasets use @.StartDate and @.EndDate. The list to select for
> @.UserName is produced after @.StartDate and @.EndDate are entered. I expected
> the report to let me select the username after I enter @.StartDate and
> @.EndDate. However in the preview tab right at the moment when I clicked on
> the box for @.EndDate to enter a value the program hang up (VS 2003). I
> uploaded it to a report server to see how it behaves then I got this error
> after I click on the EndDate box: The value provided for the report
> parameter 'EndDate' is not valid for its type.
> (rsReportParameterTypeMismatch).
> I don't know what's wrong. If I change the dataset UserName to list all
> users (no parameter required) then the report runs fine. I use Visual
> Studio .NET 2003 Service Pack 1, report server is SQL 2000 with latest SP on
> the O/S, SQL, and SQL RS.
> An thought?
> Thanks.
The issue sounds kind of strange. Maybe you should check to make sure
that you have the correct @.EndDate mapping as part of the UserName
dataset (via the Data tab -> Edit Selected Dataset button [...] ->
Parameters tab). Also, make sure that the stored procedure/query that
sources the UserName dataset is not expecting a different data type
for @.EndDate (for whatever reason). Sorry I could not be of greater
assistance.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks for the reply. I use datatime as data type for @.StartDate, @.EndDate
in both datasets. Double checked everything but still have no clue why.
When I learned and practiced SQL 2005 I had no problem doing similar thing.
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1178160515.514988.169100@.e65g2000hsc.googlegroups.com...
> On May 2, 5:31 pm, "ME" <M...@.mail.com> wrote:
>> I have a report that will pull out a list of bugs assigned to users for a
>> period of time (@.StartDate, @.EndDate). Optionally the report has option
>> to
>> select a single user (@.UserName) or just all of them. There are 2
>> datasets.
>> First dataset: Bugs requires 3 parameters: @.StartDate, @.EndDate,
>> @.UserName.
>> Second dataset: UserName. At first I have a query to list all users.
>> Since
>> the list has hundreds of users while the result set from dataset Bugs
>> mostly
>> has less than 10 users, I built another query to list only users having
>> bugs
>> assigned from @.StartDate to @.EndDate. So it requires 2 parameters
>> @.StartDate
>> and @.Enddate.
>> Now both datasets use @.StartDate and @.EndDate. The list to select for
>> @.UserName is produced after @.StartDate and @.EndDate are entered. I
>> expected
>> the report to let me select the username after I enter @.StartDate and
>> @.EndDate. However in the preview tab right at the moment when I clicked
>> on
>> the box for @.EndDate to enter a value the program hang up (VS 2003). I
>> uploaded it to a report server to see how it behaves then I got this
>> error
>> after I click on the EndDate box: The value provided for the report
>> parameter 'EndDate' is not valid for its type.
>> (rsReportParameterTypeMismatch).
>> I don't know what's wrong. If I change the dataset UserName to list all
>> users (no parameter required) then the report runs fine. I use Visual
>> Studio .NET 2003 Service Pack 1, report server is SQL 2000 with latest SP
>> on
>> the O/S, SQL, and SQL RS.
>> An thought?
>> Thanks.
>
> The issue sounds kind of strange. Maybe you should check to make sure
> that you have the correct @.EndDate mapping as part of the UserName
> dataset (via the Data tab -> Edit Selected Dataset button [...] ->
> Parameters tab). Also, make sure that the stored procedure/query that
> sources the UserName dataset is not expecting a different data type
> for @.EndDate (for whatever reason). Sorry I could not be of greater
> assistance.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>

problem with "select all" on 2 multi-value cascading parameters

Hello,

since some hours I'm struggling with 2 multi-value cascading parameters which default values should be always "Select ALL"

First Parameter:

available vlaues: From query

dataSetBig SmilesGetCountry (defined as select from tblCountries)

ValueFied:ContryName

LabelField:CountryName

DefaultValues: from Query

dataSetBig SmilesGetCountry

ValueFied:ContryName

SecondParameter:

available vlaues: From query

dataSetBig SmilesGetAreas (stored procedure which parameter is the list of the selected countries)

ValueFied:AreaName

LabelField:AreaName

DefaultValues: from Query

dataSetBig SmilesGetAreas

ValueFied:AreaName

First time I open the report

the first and the second parameters are properly filled and for both parameters "select all" is checked.

I select one option from the first parameter, the second parameter's content change dinamically and "Select All" option is still selected !Cool

Now I change the selection on the first Parameter, by checking AN ANOTHER item from the list , the second parameter list refresh dinamically but "Select all" IS NOT selected and only the item that were previously checked kept the selection !!!NO!!

Is this a bug in Reporting services and I have to say to ther user that is not possible to develop what they would like to have or there is , even programmatically, a way to solve it?

Thankx for any helps!

Marina B

Hello,

I notice that your second parameter is populated by a stored procedure. Is it possible for you to perform that query from within SRS rather than as a stored procedure?

I'm fairly new at this, so I hesitate to make an absolute statement, but multi-value parameters don't work well with stored procedures.

Also, the second query, the one accepting the first parameter must use an IN clause, rather than a WHERE clause, to filter the results.

I bow to any contradictory experience others may have.

Respectfully,

David Emigh

|||

Hi David,

I changed the definition of my parameters based on your advice

dataSet: dsGetCountry (defined as select from tblCountries)

ValueFied: ContryID

LabelField: CountryName

DefaultValues: from Query

dataSet: dsGetCountry

ValueFied: ContryName

Now the Second Parameter is setup in this ways

I created a new DataSet named: dsgetAreaByCountryID

select distinct(AreaName)
from [dbo].[tblArea] a
INNER JOIN [dbo].[tblcountry] c on a.CountryID = c.CountryID
where not AreaName is null and c.CountryID in (@.cc)
group by AreaName
order by AreaName asc

@.cc is a new Parameter which value is =Parameters!CountryID.Value

I tried to copy write directly c.CountryID in (Parameters!CountryID.Value)
but I get an error ( the ! is not welcome)

dataSet: dsgetAreaByCountryID

ValueFied: AreaName

LabelField: AreaName

DefaultValues: from Query

dataSet: dsgetAreaByCountryID

ValueFied: AreaName

Anyway I have the same problem as with the Stored Procedure!!

Did I follow exactly your advice?

Thank you very much
Marina B

|||

Have you adjusted the settings in the report parameters?

From the data or layout view:

Report menu > Parameters

|||

mmhhh ... your last reply is not completely clear to me.

what do you mean with that...

I have changed the parameter setting as I wrote in my last message...

Did I forgot something?

Thankx

Marina B.

|||I have had the same results. Don't think it's a bug. It looses track if you start going back and forth. If you want to start the parameter selection over you might be better off hitting refresh and selecting the parameters in the correct order. Be sure to explain the same to your end users. I do agree that it would be nice if it always keep track of them.|||

How is possible to hit the refresh?

Programmatically?

Thankx very much

MArina B.

problem with "select all" on 2 multi-value cascading parameters

Hello,

since some hours I'm struggling with 2 multi-value cascading parameters which default values should be always "Select ALL"

First Parameter:

available vlaues: From query

dataSetBig SmilesGetCountry (defined as select from tblCountries)

ValueFied:ContryName

LabelField:CountryName

DefaultValues: from Query

dataSetBig SmilesGetCountry

ValueFied:ContryName

SecondParameter:

available vlaues: From query

dataSetBig SmilesGetAreas (stored procedure which parameter is the list of the selected countries)

ValueFied:AreaName

LabelField:AreaName

DefaultValues: from Query

dataSetBig SmilesGetAreas

ValueFied:AreaName

First time I open the report

the first and the second parameters are properly filled and for both parameters "select all" is checked.

I select one option from the first parameter, the second parameter's content change dinamically and "Select All" option is still selected !Cool

Now I change the selection on the first Parameter, by checking AN ANOTHER item from the list , the second parameter list refresh dinamically but "Select all" IS NOT selected and only the item that were previously checked kept the selection !!!NO!!

Is this a bug in Reporting services and I have to say to ther user that is not possible to develop what they would like to have or there is , even programmatically, a way to solve it?

Thankx for any helps!

Marina B

Hello,

I notice that your second parameter is populated by a stored procedure. Is it possible for you to perform that query from within SRS rather than as a stored procedure?

I'm fairly new at this, so I hesitate to make an absolute statement, but multi-value parameters don't work well with stored procedures.

Also, the second query, the one accepting the first parameter must use an IN clause, rather than a WHERE clause, to filter the results.

I bow to any contradictory experience others may have.

Respectfully,

David Emigh

|||

Hi David,

I changed the definition of my parameters based on your advice

dataSet: dsGetCountry (defined as select from tblCountries)

ValueFied: ContryID

LabelField: CountryName

DefaultValues: from Query

dataSet: dsGetCountry

ValueFied: ContryName

Now the Second Parameter is setup in this ways

I created a new DataSet named: dsgetAreaByCountryID

select distinct(AreaName)
from [dbo].[tblArea] a
INNER JOIN [dbo].[tblcountry] c on a.CountryID = c.CountryID
where not AreaName is null and c.CountryID in (@.cc)
group by AreaName
order by AreaName asc

@.cc is a new Parameter which value is =Parameters!CountryID.Value

I tried to copy write directly c.CountryID in (Parameters!CountryID.Value)
but I get an error ( the ! is not welcome)

dataSet: dsgetAreaByCountryID

ValueFied: AreaName

LabelField: AreaName

DefaultValues: from Query

dataSet: dsgetAreaByCountryID

ValueFied: AreaName

Anyway I have the same problem as with the Stored Procedure!!

Did I follow exactly your advice?

Thank you very much
Marina B

|||

Have you adjusted the settings in the report parameters?

From the data or layout view:

Report menu > Parameters

|||

mmhhh ... your last reply is not completely clear to me.

what do you mean with that...

I have changed the parameter setting as I wrote in my last message...

Did I forgot something?

Thankx

Marina B.

|||I have had the same results. Don't think it's a bug. It looses track if you start going back and forth. If you want to start the parameter selection over you might be better off hitting refresh and selecting the parameters in the correct order. Be sure to explain the same to your end users. I do agree that it would be nice if it always keep track of them.|||

How is possible to hit the refresh?

Programmatically?

Thankx very much

MArina B.

sql

Problem with <Select a value> in report parameters

Hello, Everyone

please, could you make clear how can I avoid appearence of <select a value> in drop downs at all.

thanks

not sure if this will work, but could you set a default value of a zero length string or null value?|||

steveareno wrote:

not sure if this will work, but could you set a default value of a zero length string or null value?

It will definately work if you automatically select the first (or any) item in the list.

sluggy

|||

but doesn't work =)

I have a next drop down with predefined values:

Show all = -2
Local = 0
Another one = -1

I make default value = -2
and when I open report via browser I get this drop down with prepopulated values and currently chosen is Show all

BUT also I can choose <select a value>

P.S. I afraid that I should write custom code for UI of Reporting Services

Thanks, lads

Tuesday, March 20, 2012

Problem while using xp_sendmail

Hi,
When I use xp_sendmail on my local machine, using parameters like
Exec master.dbo.xp_sendmail @.recipients = 'my email id' , @.message = '
some message', @.subject = ' some subject ', then it works fine and I get
the mail in my mailbox ...
But when I use the same stuff on any other SQL server (on same network), I
get the error --
xp_sendmail: Procedure expects parameter @.user, which was not supplied.
I've searched in BOL, there is no parameter called @.user for xp_sendmail.
What and where is the problem ?
regards
KP
XP_Sendmail has a parameter for set_user, perhaps thewrong message is being
sent ( but not likely)
Check to make sure no one has placed an xp_sendmail in your local
database...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Krishnaprasad Paralikar" <KrishnaprasadParalikar@.discussions.microsoft.com>
wrote in message news:1616F7CF-3D68-4FAB-A5BD-5B1979494336@.microsoft.com...
> Hi,
> When I use xp_sendmail on my local machine, using parameters like
> Exec master.dbo.xp_sendmail @.recipients = 'my email id' , @.message = '
> some message', @.subject = ' some subject ', then it works fine and I
> get
> the mail in my mailbox ...
> But when I use the same stuff on any other SQL server (on same network), I
> get the error --
> xp_sendmail: Procedure expects parameter @.user, which was not supplied.
> I've searched in BOL, there is no parameter called @.user for xp_sendmail.
> What and where is the problem ?
> regards
> KP
|||So there is a possibility of having 'different' version of xp_sendmail on
other machine (where it does not work). How can I replace a DLL file? Will
simple overwriting help? Pls advice.
"Wayne Snyder" wrote:

> XP_Sendmail has a parameter for set_user, perhaps thewrong message is being
> sent ( but not likely)
> Check to make sure no one has placed an xp_sendmail in your local
> database...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Krishnaprasad Paralikar" <KrishnaprasadParalikar@.discussions.microsoft.com>
> wrote in message news:1616F7CF-3D68-4FAB-A5BD-5B1979494336@.microsoft.com...
>
>

Problem while using xp_sendmail

Hi,
When I use xp_sendmail on my local machine, using parameters like
Exec master.dbo.xp_sendmail @.recipients = 'my email id' , @.message = '
some message', @.subject = ' some subject ', then it works fine and I get
the mail in my mailbox ...
But when I use the same stuff on any other SQL server (on same network), I
get the error --
xp_sendmail: Procedure expects parameter @.user, which was not supplied.
I've searched in BOL, there is no parameter called @.user for xp_sendmail.
What and where is the problem ?
regards
KPXP_Sendmail has a parameter for set_user, perhaps thewrong message is being
sent ( but not likely)
Check to make sure no one has placed an xp_sendmail in your local
database...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Krishnaprasad Paralikar" <KrishnaprasadParalikar@.discussions.microsoft.com>
wrote in message news:1616F7CF-3D68-4FAB-A5BD-5B1979494336@.microsoft.com...
> Hi,
> When I use xp_sendmail on my local machine, using parameters like
> Exec master.dbo.xp_sendmail @.recipients = 'my email id' , @.message = '
> some message', @.subject = ' some subject ', then it works fine and I
> get
> the mail in my mailbox ...
> But when I use the same stuff on any other SQL server (on same network), I
> get the error --
> xp_sendmail: Procedure expects parameter @.user, which was not supplied.
> I've searched in BOL, there is no parameter called @.user for xp_sendmail.
> What and where is the problem ?
> regards
> KP|||So there is a possibility of having 'different' version of xp_sendmail on
other machine (where it does not work). How can I replace a DLL file? Will
simple overwriting help? Pls advice.
"Wayne Snyder" wrote:

> XP_Sendmail has a parameter for set_user, perhaps thewrong message is bein
g
> sent ( but not likely)
> Check to make sure no one has placed an xp_sendmail in your local
> database...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Krishnaprasad Paralikar" <KrishnaprasadParalikar@.discussions.microsoft.co
m>
> wrote in message news:1616F7CF-3D68-4FAB-A5BD-5B1979494336@.microsoft.com..
.
>
>

Problem while using xp_sendmail

Hi,
When I use xp_sendmail on my local machine, using parameters like
Exec master.dbo.xp_sendmail @.recipients = 'my email id' , @.message = '
some message', @.subject = ' some subject ', then it works fine and I get
the mail in my mailbox ...
But when I use the same stuff on any other SQL server (on same network), I
get the error --
xp_sendmail: Procedure expects parameter @.user, which was not supplied.
I've searched in BOL, there is no parameter called @.user for xp_sendmail.
What and where is the problem ?
regards
KPXP_Sendmail has a parameter for set_user, perhaps thewrong message is being
sent ( but not likely)
Check to make sure no one has placed an xp_sendmail in your local
database...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Krishnaprasad Paralikar" <KrishnaprasadParalikar@.discussions.microsoft.com>
wrote in message news:1616F7CF-3D68-4FAB-A5BD-5B1979494336@.microsoft.com...
> Hi,
> When I use xp_sendmail on my local machine, using parameters like
> Exec master.dbo.xp_sendmail @.recipients = 'my email id' , @.message = '
> some message', @.subject = ' some subject ', then it works fine and I
> get
> the mail in my mailbox ...
> But when I use the same stuff on any other SQL server (on same network), I
> get the error --
> xp_sendmail: Procedure expects parameter @.user, which was not supplied.
> I've searched in BOL, there is no parameter called @.user for xp_sendmail.
> What and where is the problem ?
> regards
> KP|||So there is a possibility of having 'different' version of xp_sendmail on
other machine (where it does not work). How can I replace a DLL file? Will
simple overwriting help? Pls advice.
"Wayne Snyder" wrote:
> XP_Sendmail has a parameter for set_user, perhaps thewrong message is being
> sent ( but not likely)
> Check to make sure no one has placed an xp_sendmail in your local
> database...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Krishnaprasad Paralikar" <KrishnaprasadParalikar@.discussions.microsoft.com>
> wrote in message news:1616F7CF-3D68-4FAB-A5BD-5B1979494336@.microsoft.com...
> > Hi,
> >
> > When I use xp_sendmail on my local machine, using parameters like
> > Exec master.dbo.xp_sendmail @.recipients = 'my email id' , @.message = '
> > some message', @.subject = ' some subject ', then it works fine and I
> > get
> > the mail in my mailbox ...
> >
> > But when I use the same stuff on any other SQL server (on same network), I
> > get the error --
> > xp_sendmail: Procedure expects parameter @.user, which was not supplied.
> >
> > I've searched in BOL, there is no parameter called @.user for xp_sendmail.
> >
> > What and where is the problem ?
> >
> > regards
> > KP
>
>

Monday, March 12, 2012

Problem when passing parameters to Reporting services

Hello,
Am new to reporting services and having problems passing parameters.
I am using ASP.Net with .NetFramework 1.1 and am trying out reporting
services 2005.
I am using an object of the ReportExecutionService along with the render
method.
I have tried a few differnet examples and none have worked. Does anyone have
any working piece of code that i can try?
Thanks in advance
Regards
IshanJust to add to the question...
There are at least two Render methods specified in the documentation.
One is a call with 12 parameters one of which is the Report parameters.
The other Render method comes from the ReportExecution service and takes
just 5 parameters and the Report Parameters are set using a call to a separate
SetReportExecutionParameters.
Which of these methods has anyone used successfully ? Getting very strange
errors regarding Parameters from both of these Render routines.

Wednesday, March 7, 2012

Problem w/ Dynamic Query

I'm having problems constructing a dynamic query on the Data tab in SQL Reporting Services. When I try to use one of the reporting parameters it fails with "The expression for the query â'Dataâ' contains an error: [BC30648] String constants must end with a double quote." I want to be able to append the value of the chain the user selected to the end of the query. Anyone have any ideas.
My query is:
="SELECT {{[Product].[All Product]}*{Descendants([Market].[All Market].[Bob Jones])}} on rows,
{{[Time].[All Time].[2003-01-01 00:00:00].[2003-05-16 00:00:00],
[Time].[All Time].[2004-01-01 00:00:00].[2004-05-16 00:00:00],
[Time].[All Time].[2003-01-01 00:00:00].[2003-06-16 00:00:00],
[Time].[All Time].[2004-01-01 00:00:00].[2004-06-16 00:00:00]}
*{[Dollar Volume]}} on columns FROM " & Parameters!Chain.Value
If I get rid of the parameter and just end the query with a hard coded chain it works.Did you try appending a CStr(Parameters!Chain.Value) instead?
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Karch" <Karch@.discussions.microsoft.com> wrote in message
news:A1A5AB61-FFAC-49C3-A300-290A7C85906C@.microsoft.com...
> I'm having problems constructing a dynamic query on the Data tab in SQL
Reporting Services. When I try to use one of the reporting parameters it
fails with "The expression for the query â'Dataâ' contains an error:
[BC30648] String constants must end with a double quote." I want to be able
to append the value of the chain the user selected to the end of the query.
Anyone have any ideas.
> My query is:
> ="SELECT {{[Product].[All Product]}*{Descendants([Market].[All
Market].[Bob Jones])}} on rows,
> {{[Time].[All Time].[2003-01-01 00:00:00].[2003-05-16 00:00:00],
> [Time].[All Time].[2004-01-01 00:00:00].[2004-05-16 00:00:00],
> [Time].[All Time].[2003-01-01 00:00:00].[2003-06-16 00:00:00],
> [Time].[All Time].[2004-01-01 00:00:00].[2004-06-16 00:00:00]}
> *{[Dollar Volume]}} on columns FROM " & Parameters!Chain.Value
> If I get rid of the parameter and just end the query with a hard coded
chain it works.|||Parameterized MDX queries are not supported by the OleDB provider for OLAP
8.0. Therefore you have to use an expression-based query (in the text-based
generic query designer).
Since you cannot execute expression-based queries directly in the query
designer, you should first design your report based on a MDX query _without_
parameters, detect the fields and design the report.
When you are done, you would convert the MDX query into an expression-based
MDX query (as you tried initially). Before doing that, you might want to add
a textbox somewhere in your report and experiment with the expression till
it evaluates to a valid MDX query and then copy the expression into the
query designer.
You might also want to check out a sample available for download:
http://www.microsoft.com/downloads/details.aspx?FamilyID=f9b6e945-1f4c-4b7c-9c83-c6801f0576ff&DisplayLang=en
Additional information on the integration of RS 2000 and AS 2000 is provided
at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/olapasandrs.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Karch" <Karch@.discussions.microsoft.com> wrote in message
news:AC5B0D16-5C07-4258-AF6C-EC6925180DE0@.microsoft.com...
> I looked at it again. I think the problem is that parameters are not
supported with the OLE DB provider. The report I'm generating is hitting a
cube.
> Query:
> SELECT {{[Product].[All Product]}*{Descendants([Market].[All
Market].[East - Bob Jones])}} on rows, {{[Time].[All Time].[2003-01-01
00:00:00].[2003-05-18 00:00:00], [Time].[All Time].[2004-01-01
00:00:00].[2004-05-16 00:00:00], [Time].[All Time].[2003-01-01
00:00:00].[2003-06-15 00:00:00], [Time].[All Time].[2004-01-01
00:00:00].[2004-06-13 00:00:00]}*{[Dollar Volume]}} on columns FROM @.Chain
> @.Chain is mapped to "=Parameters!Chain.Value" in the DataSet.
> Error:
> Could not generate a list of fields for the query. Check the query syntax
or click Refresh Fields on the query toolbar. The ICommandWithParameters
interface is not supported by the 'MSOLAP.2' provider. Command parameters
are unsupported with the current provider.
>
> "Ravi Mumulla (Microsoft)" wrote:
> > Did you try appending a CStr(Parameters!Chain.Value) instead?
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > "Karch" <Karch@.discussions.microsoft.com> wrote in message
> > news:A1A5AB61-FFAC-49C3-A300-290A7C85906C@.microsoft.com...
> > > I'm having problems constructing a dynamic query on the Data tab in
SQL
> > Reporting Services. When I try to use one of the reporting parameters
it
> > fails with "The expression for the query â?~Dataâ?T contains an error:
> > [BC30648] String constants must end with a double quote." I want to be
able
> > to append the value of the chain the user selected to the end of the
query.
> > Anyone have any ideas.
> > >
> > > My query is:
> > > ="SELECT {{[Product].[All Product]}*{Descendants([Market].[All
> > Market].[Bob Jones])}} on rows,
> > > {{[Time].[All Time].[2003-01-01 00:00:00].[2003-05-16 00:00:00],
> > > [Time].[All Time].[2004-01-01 00:00:00].[2004-05-16 00:00:00],
> > > [Time].[All Time].[2003-01-01 00:00:00].[2003-06-16 00:00:00],
> > > [Time].[All Time].[2004-01-01 00:00:00].[2004-06-16 00:00:00]}
> > > *{[Dollar Volume]}} on columns FROM " & Parameters!Chain.Value
> > >
> > > If I get rid of the parameter and just end the query with a hard coded
> > chain it works.
> >
> >
> >|||First Prize.
Thanks for the assistance. Sure helped me alot
"Robert Bruckner [MSFT]" wrote:
> Parameterized MDX queries are not supported by the OleDB provider for OLAP
> 8.0. Therefore you have to use an expression-based query (in the text-based
> generic query designer).
> Since you cannot execute expression-based queries directly in the query
> designer, you should first design your report based on a MDX query _without_
> parameters, detect the fields and design the report.
> When you are done, you would convert the MDX query into an expression-based
> MDX query (as you tried initially). Before doing that, you might want to add
> a textbox somewhere in your report and experiment with the expression till
> it evaluates to a valid MDX query and then copy the expression into the
> query designer.
> You might also want to check out a sample available for download:
> http://www.microsoft.com/downloads/details.aspx?FamilyID=f9b6e945-1f4c-4b7c-9c83-c6801f0576ff&DisplayLang=en
> Additional information on the integration of RS 2000 and AS 2000 is provided
> at:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/olapasandrs.asp
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Karch" <Karch@.discussions.microsoft.com> wrote in message
> news:AC5B0D16-5C07-4258-AF6C-EC6925180DE0@.microsoft.com...
> > I looked at it again. I think the problem is that parameters are not
> supported with the OLE DB provider. The report I'm generating is hitting a
> cube.
> >
> > Query:
> > SELECT {{[Product].[All Product]}*{Descendants([Market].[All
> Market].[East - Bob Jones])}} on rows, {{[Time].[All Time].[2003-01-01
> 00:00:00].[2003-05-18 00:00:00], [Time].[All Time].[2004-01-01
> 00:00:00].[2004-05-16 00:00:00], [Time].[All Time].[2003-01-01
> 00:00:00].[2003-06-15 00:00:00], [Time].[All Time].[2004-01-01
> 00:00:00].[2004-06-13 00:00:00]}*{[Dollar Volume]}} on columns FROM @.Chain
> >
> > @.Chain is mapped to "=Parameters!Chain.Value" in the DataSet.
> >
> > Error:
> > Could not generate a list of fields for the query. Check the query syntax
> or click Refresh Fields on the query toolbar. The ICommandWithParameters
> interface is not supported by the 'MSOLAP.2' provider. Command parameters
> are unsupported with the current provider.
> >
> >
> >
> > "Ravi Mumulla (Microsoft)" wrote:
> >
> > > Did you try appending a CStr(Parameters!Chain.Value) instead?
> > >
> > > --
> > > Ravi Mumulla (Microsoft)
> > > SQL Server Reporting Services
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > > "Karch" <Karch@.discussions.microsoft.com> wrote in message
> > > news:A1A5AB61-FFAC-49C3-A300-290A7C85906C@.microsoft.com...
> > > > I'm having problems constructing a dynamic query on the Data tab in
> SQL
> > > Reporting Services. When I try to use one of the reporting parameters
> it
> > > fails with "The expression for the query â?~Dataâ?T contains an error:
> > > [BC30648] String constants must end with a double quote." I want to be
> able
> > > to append the value of the chain the user selected to the end of the
> query.
> > > Anyone have any ideas.
> > > >
> > > > My query is:
> > > > ="SELECT {{[Product].[All Product]}*{Descendants([Market].[All
> > > Market].[Bob Jones])}} on rows,
> > > > {{[Time].[All Time].[2003-01-01 00:00:00].[2003-05-16 00:00:00],
> > > > [Time].[All Time].[2004-01-01 00:00:00].[2004-05-16 00:00:00],
> > > > [Time].[All Time].[2003-01-01 00:00:00].[2003-06-16 00:00:00],
> > > > [Time].[All Time].[2004-01-01 00:00:00].[2004-06-16 00:00:00]}
> > > > *{[Dollar Volume]}} on columns FROM " & Parameters!Chain.Value
> > > >
> > > > If I get rid of the parameter and just end the query with a hard coded
> > > chain it works.
> > >
> > >
> > >
>
>

Monday, February 20, 2012

PROBLEM- Use parameter to populate field in headerpage

Hi all,
I use hidden report parameters to populate textboxes in the pageheader and
come across this problem.
When the query for the default value for a parameter returns no rows, I get
an error "Parameter validation failed. It is not possible to provide valid
values for all parameters. (rsParameterError)".
This error is expected in this case. My question is is there a way to get
around this?
ThanksIn the query for the parameters dataset, force a record to be returned.
Union is a good function for this. I.e.,
Select Name From Table1 Where Type = 'whatever'
UNION
Select '(blank)'
Or you could do
If Exists(Select * From Table1 Where Type = 'whatever')
Select Name From Table1 Where Type = 'whatever'
Else
Select '(blank)' As Name
First option is more efficient but may have side effects for you.
Chris
Bach wrote:
> Hi all,
> I use hidden report parameters to populate textboxes in the
> pageheader and come across this problem.
> When the query for the default value for a parameter returns no rows,
> I get an error "Parameter validation failed. It is not possible to
> provide valid values for all parameters. (rsParameterError)".
> This error is expected in this case. My question is is there a way to
> get around this?
> Thanks