Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Monday, March 26, 2012

Multi-Select Parameters

How does setting the Default type to Component work?

? - With all due respect -

Can you be more specific - I have not seen this before?

Best Regards,

sql

Multi-Select Error, easy question

I am trying to show/hide a table based on a multi-select parameter in VS 2005
beta 2.
In the parameter I have the following:
Data Type: String
Multi-value - checked
Label: General Info
Value: GeneralInfo
In the properties for the report I have the following under Visibility:
=IIF(Parameters!DisplayInfo.Value = "GeneralInfo", False, True)
When I execute the report and choose the only parameter value I get the
following. (once I get this to work I will add additional parameters)
Error:
Processing Error
"The Hidden expression for the table 'Table_Header' contains an error:
Overload resolution failed because no Public '=' can be called with these
arguments:
Public Shared Operator =(a As String, b As String) As Boolen':
Argument matching parameter 'a' connot convert from 'Object()' to 'String'.
Thanks!!!
--
Thank You!Once you mark a parameter as "multi-value", the .Value property will return
an object[] with all selected values. If only one value is selected, it will
be an object array of length = 1. Object arrays cannot be directly compared
with Strings.
To access individual values of a multi value parameter you can use
expressions like this:
=Parameters!MVP1.IsMultiValue
boolean flag - tells if a parameter is defined as multi value
=Parameters!MVP1.Count
returns the number of values in the array
=Parameters!MVP1.Value(0)
returns the first selected value
=Join(Parameters!MVP1.Value)
creates a space separated list of values
=Join(Parameters!MVP1.Value, ", ")
creates a comma separated list of values
=Split("a b c", " ")
to create a multi value object array from a string (this can be used
e.g. for drillthrough parameters, subreports, or query parameters)
See also MSDN:
* http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
* http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Shane Eckel" <ShaneEckel@.discussions.microsoft.com> wrote in message
news:5D2D2514-991E-4D75-87AE-DDC546D171A9@.microsoft.com...
>I am trying to show/hide a table based on a multi-select parameter in VS
>2005
> beta 2.
> In the parameter I have the following:
> Data Type: String
> Multi-value - checked
> Label: General Info
> Value: GeneralInfo
> In the properties for the report I have the following under Visibility:
> =IIF(Parameters!DisplayInfo.Value = "GeneralInfo", False, True)
> When I execute the report and choose the only parameter value I get the
> following. (once I get this to work I will add additional parameters)
>
> Error:
> Processing Error
> "The Hidden expression for the table 'Table_Header' contains an error:
> Overload resolution failed because no Public '=' can be called with these
> arguments:
> Public Shared Operator =(a As String, b As String) As Boolen':
> Argument matching parameter 'a' connot convert from 'Object()' to
> 'String'.
> Thanks!!!
> --
> Thank You!|||Robert, thanks my man, thanks for taking the time to respond. I'll try this
out first thing tomorrow.
Thanks!
Shane
--
Thank You!
"Robert Bruckner [MSFT]" wrote:
> Once you mark a parameter as "multi-value", the .Value property will return
> an object[] with all selected values. If only one value is selected, it will
> be an object array of length = 1. Object arrays cannot be directly compared
> with Strings.
> To access individual values of a multi value parameter you can use
> expressions like this:
> =Parameters!MVP1.IsMultiValue
> boolean flag - tells if a parameter is defined as multi value
> =Parameters!MVP1.Count
> returns the number of values in the array
> =Parameters!MVP1.Value(0)
> returns the first selected value
> =Join(Parameters!MVP1.Value)
> creates a space separated list of values
> =Join(Parameters!MVP1.Value, ", ")
> creates a comma separated list of values
> =Split("a b c", " ")
> to create a multi value object array from a string (this can be used
> e.g. for drillthrough parameters, subreports, or query parameters)
> See also MSDN:
> * http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
> * http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Shane Eckel" <ShaneEckel@.discussions.microsoft.com> wrote in message
> news:5D2D2514-991E-4D75-87AE-DDC546D171A9@.microsoft.com...
> >I am trying to show/hide a table based on a multi-select parameter in VS
> >2005
> > beta 2.
> >
> > In the parameter I have the following:
> > Data Type: String
> > Multi-value - checked
> > Label: General Info
> > Value: GeneralInfo
> >
> > In the properties for the report I have the following under Visibility:
> > =IIF(Parameters!DisplayInfo.Value = "GeneralInfo", False, True)
> >
> > When I execute the report and choose the only parameter value I get the
> > following. (once I get this to work I will add additional parameters)
> >
> >
> > Error:
> > Processing Error
> > "The Hidden expression for the table 'Table_Header' contains an error:
> > Overload resolution failed because no Public '=' can be called with these
> > arguments:
> > Public Shared Operator =(a As String, b As String) As Boolen':
> > Argument matching parameter 'a' connot convert from 'Object()' to
> > 'String'.
> >
> > Thanks!!!
> >
> > --
> > Thank You!
>
>|||Robert, thanks for your reply. Very valuable information for this report and
for my future reports.
You wrote, "Object arrays cannot be directly compared with strings." Do you
know how I could do this 'indirectly'?
Let's say the user selects 'GeneralInfo' and 'Contact Info' in the
multi-select. Do you know of a way to evaluate their selection so I can take
action on it? (such as visability)
Thanks again for your help.
Shane
--
Thank You!
"Robert Bruckner [MSFT]" wrote:
> Once you mark a parameter as "multi-value", the .Value property will return
> an object[] with all selected values. If only one value is selected, it will
> be an object array of length = 1. Object arrays cannot be directly compared
> with Strings.
> To access individual values of a multi value parameter you can use
> expressions like this:
> =Parameters!MVP1.IsMultiValue
> boolean flag - tells if a parameter is defined as multi value
> =Parameters!MVP1.Count
> returns the number of values in the array
> =Parameters!MVP1.Value(0)
> returns the first selected value
> =Join(Parameters!MVP1.Value)
> creates a space separated list of values
> =Join(Parameters!MVP1.Value, ", ")
> creates a comma separated list of values
> =Split("a b c", " ")
> to create a multi value object array from a string (this can be used
> e.g. for drillthrough parameters, subreports, or query parameters)
> See also MSDN:
> * http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
> * http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Shane Eckel" <ShaneEckel@.discussions.microsoft.com> wrote in message
> news:5D2D2514-991E-4D75-87AE-DDC546D171A9@.microsoft.com...
> >I am trying to show/hide a table based on a multi-select parameter in VS
> >2005
> > beta 2.
> >
> > In the parameter I have the following:
> > Data Type: String
> > Multi-value - checked
> > Label: General Info
> > Value: GeneralInfo
> >
> > In the properties for the report I have the following under Visibility:
> > =IIF(Parameters!DisplayInfo.Value = "GeneralInfo", False, True)
> >
> > When I execute the report and choose the only parameter value I get the
> > following. (once I get this to work I will add additional parameters)
> >
> >
> > Error:
> > Processing Error
> > "The Hidden expression for the table 'Table_Header' contains an error:
> > Overload resolution failed because no Public '=' can be called with these
> > arguments:
> > Public Shared Operator =(a As String, b As String) As Boolen':
> > Argument matching parameter 'a' connot convert from 'Object()' to
> > 'String'.
> >
> > Thanks!!!
> >
> > --
> > Thank You!
>
>|||Hi Robert, don't worry about replying again. I think I figured it out. I
need to split it after I join it, right?
--
Thank You!
"Robert Bruckner [MSFT]" wrote:
> Once you mark a parameter as "multi-value", the .Value property will return
> an object[] with all selected values. If only one value is selected, it will
> be an object array of length = 1. Object arrays cannot be directly compared
> with Strings.
> To access individual values of a multi value parameter you can use
> expressions like this:
> =Parameters!MVP1.IsMultiValue
> boolean flag - tells if a parameter is defined as multi value
> =Parameters!MVP1.Count
> returns the number of values in the array
> =Parameters!MVP1.Value(0)
> returns the first selected value
> =Join(Parameters!MVP1.Value)
> creates a space separated list of values
> =Join(Parameters!MVP1.Value, ", ")
> creates a comma separated list of values
> =Split("a b c", " ")
> to create a multi value object array from a string (this can be used
> e.g. for drillthrough parameters, subreports, or query parameters)
> See also MSDN:
> * http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
> * http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Shane Eckel" <ShaneEckel@.discussions.microsoft.com> wrote in message
> news:5D2D2514-991E-4D75-87AE-DDC546D171A9@.microsoft.com...
> >I am trying to show/hide a table based on a multi-select parameter in VS
> >2005
> > beta 2.
> >
> > In the parameter I have the following:
> > Data Type: String
> > Multi-value - checked
> > Label: General Info
> > Value: GeneralInfo
> >
> > In the properties for the report I have the following under Visibility:
> > =IIF(Parameters!DisplayInfo.Value = "GeneralInfo", False, True)
> >
> > When I execute the report and choose the only parameter value I get the
> > following. (once I get this to work I will add additional parameters)
> >
> >
> > Error:
> > Processing Error
> > "The Hidden expression for the table 'Table_Header' contains an error:
> > Overload resolution failed because no Public '=' can be called with these
> > arguments:
> > Public Shared Operator =(a As String, b As String) As Boolen':
> > Argument matching parameter 'a' connot convert from 'Object()' to
> > 'String'.
> >
> > Thanks!!!
> >
> > --
> > Thank You!
>
>|||Yes. The Join() will create a string from a multi dimensional object array.
The Split() function is the inverse function; it splits the string into a
multi dimensional array.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Shane Eckel" <ShaneEckel@.discussions.microsoft.com> wrote in message
news:05BDA0D3-9D01-4C62-A844-99FE9F2BD791@.microsoft.com...
> Hi Robert, don't worry about replying again. I think I figured it out. I
> need to split it after I join it, right?
> --
> Thank You!
>
> "Robert Bruckner [MSFT]" wrote:
>> Once you mark a parameter as "multi-value", the .Value property will
>> return
>> an object[] with all selected values. If only one value is selected, it
>> will
>> be an object array of length = 1. Object arrays cannot be directly
>> compared
>> with Strings.
>> To access individual values of a multi value parameter you can use
>> expressions like this:
>> =Parameters!MVP1.IsMultiValue
>> boolean flag - tells if a parameter is defined as multi value
>> =Parameters!MVP1.Count
>> returns the number of values in the array
>> =Parameters!MVP1.Value(0)
>> returns the first selected value
>> =Join(Parameters!MVP1.Value)
>> creates a space separated list of values
>> =Join(Parameters!MVP1.Value, ", ")
>> creates a comma separated list of values
>> =Split("a b c", " ")
>> to create a multi value object array from a string (this can be used
>> e.g. for drillthrough parameters, subreports, or query parameters)
>> See also MSDN:
>> * http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
>> * http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Shane Eckel" <ShaneEckel@.discussions.microsoft.com> wrote in message
>> news:5D2D2514-991E-4D75-87AE-DDC546D171A9@.microsoft.com...
>> >I am trying to show/hide a table based on a multi-select parameter in VS
>> >2005
>> > beta 2.
>> >
>> > In the parameter I have the following:
>> > Data Type: String
>> > Multi-value - checked
>> > Label: General Info
>> > Value: GeneralInfo
>> >
>> > In the properties for the report I have the following under Visibility:
>> > =IIF(Parameters!DisplayInfo.Value = "GeneralInfo", False, True)
>> >
>> > When I execute the report and choose the only parameter value I get the
>> > following. (once I get this to work I will add additional parameters)
>> >
>> >
>> > Error:
>> > Processing Error
>> > "The Hidden expression for the table 'Table_Header' contains an error:
>> > Overload resolution failed because no Public '=' can be called with
>> > these
>> > arguments:
>> > Public Shared Operator =(a As String, b As String) As Boolen':
>> > Argument matching parameter 'a' connot convert from 'Object()' to
>> > 'String'.
>> >
>> > Thanks!!!
>> >
>> > --
>> > Thank You!
>>

Monday, March 19, 2012

Multiple value on y axis in chart?

Friends, I would like to put employee name and type of leave on the y-axis and on the x-axis the date, so that users can select the date start and end and employee/employees and see the chart or leaves.

But how to do that?

My fields are: Name, LeaveDescription and Date.

The data with me is for each employee, for each date, leave codes are there.

You would drag and drop name and leave description to the category fields (y-axis) and date to data fields (x-axis).|||

Dear ??€?§Q?,

It gives me this error:

More than one data set, data region, or grouping in the report has the name 'chart1_CategoryGroup1'. Data set, data region, and grouping names must be unique within a report.

Please help me.

Thanks,

|||Are you trying to drag and drop the same field twice to the same axis? Find where chart1_CategoryGroup1 is being added multiple times to a dataset, data region or grouping...|||

Dear ??€?§Q?,

Yeah that worked. Thanks.

But the thing is that, It gives me description on x axis and not on y.

Multiple value on y axis in chart?

Friends, I would like to put employee name and type of leave on the y-axis and on the x-axis the date, so that users can select the date start and end and employee/employees and see the chart or leaves.

But how to do that?

My fields are: Name, LeaveDescription and Date.

The data with me is for each employee, for each date, leave codes are there.

You would drag and drop name and leave description to the category fields (y-axis) and date to data fields (x-axis).|||

Dear ??€?§Q?,

It gives me this error:

More than one data set, data region, or grouping in the report has the name 'chart1_CategoryGroup1'. Data set, data region, and grouping names must be unique within a report.

Please help me.

Thanks,

|||Are you trying to drag and drop the same field twice to the same axis? Find where chart1_CategoryGroup1 is being added multiple times to a dataset, data region or grouping...|||

Dear ??€?§Q?,

Yeah that worked. Thanks.

But the thing is that, It gives me description on x axis and not on y.

Multiple value on y axis in chart?

Friends, I would like to put employee name and type of leave on the y-axis and on the x-axis the date, so that users can select the date start and end and employee/employees and see the chart or leaves.

But how to do that?

My fields are: Name, LeaveDescription and Date.

The data with me is for each employee, for each date, leave codes are there.

You would drag and drop name and leave description to the category fields (y-axis) and date to data fields (x-axis).|||

Dear ??€?§Q?,

It gives me this error:

More than one data set, data region, or grouping in the report has the name 'chart1_CategoryGroup1'. Data set, data region, and grouping names must be unique within a report.

Please help me.

Thanks,

|||Are you trying to drag and drop the same field twice to the same axis? Find where chart1_CategoryGroup1 is being added multiple times to a dataset, data region or grouping...|||

Dear ??€?§Q?,

Yeah that worked. Thanks.

But the thing is that, It gives me description on x axis and not on y.

Friday, March 9, 2012

Multiple Suspect Databases Please help

I administer a server with 300 small databases. It appears to be some type of file corruption and now all the databases are suspect.
I am getting the following errors:
Cannot associate files with differnet databases.
Also: Log file does not match the primary file. It may be from a different database or the log may have been rebuilt previously.
Device activation error...
Now I read several online articles and determined the only way I can recover these databases, is using "sp_attach_single_file_db"
Now, with 300 databases, that would take several hours. That is the last thing I want to do.
Can someone please help. I dunno what to do. The backups I have are outdated.What events have occured to get you to this stage? Form the errors you =describe then it sounbds as though the pathnames for one db have become =scrambled with another. I can think of no waythis could occur other than =manually updating system tables incorrectly.
Anyway, if you can describe how you got to this point - as much detail =as possible then someone may well be able to help. Beig able to rescue =the data vis sp-attach is somewhat dodgy as the databases have not been =detached via sp_detach_db. To try it i would copy ALL files (data and =logs) somewhere safe, then generate as script to try the attaches. =(backup master first in case you mess it up)
Alternatively open a call with PSS to get someone helping.
Mike John
"Richard M." <anonymous@.discussions.microsoft.com> wrote in message =news:4E2AD297-67F2-40FC-AE04-2B601E5E5BFD@.microsoft.com...
> I administer a server with 300 small databases. It appears to be some =type of file corruption and now all the databases are suspect. > > I am getting the following errors:
> > Cannot associate files with differnet databases. > > Also: Log file does not match the primary file. It may be from a =different database or the log may have been rebuilt previously.
> > Device activation error...
> > > Now I read several online articles and determined the only way I can =recover these databases, is using "sp_attach_single_file_db"
> > Now, with 300 databases, that would take several hours. That is the =last thing I want to do. > > Can someone please help. I dunno what to do. The backups I have are =outdated.|||Hi ,
THank you for your reply. You are right! The "sp_attach_single_file_db " did work, but with 300 DBs it would take for ever. However, as luck may have it the hard drive on the SQL server containing the OS completely crashed! It went dead. So, the cause seems to be a combination of file curruption due to hardware failure. So, what I did was create a new server and migrated the data and log files just before the server completely died. On the new server, when I installed SQL and attempted to recover by installing the exact version and replacing the existing ystem databases witht he original so the server can see all the databases, the server completely all the databases were suspect. Hence, this means that allt eh files I transferred were corrupted some how. Now, I have two options:
A: Manually use "sp_attach_single_file_db " on all databases to recover it since it seems to work or
B: Bring the old server back online... and attempt to rectify a hand full of suspect databases.
I choose B, however the OS drive was completely dead. Luckily the drivers containing the data files and the otehr drive containg the log files were OK. The server was then rebuilt, with a new OS drive. Win2K server ws installed and surely it saw the other two drives with the data and log files. I then installed SQL server and the updates. As luck may have it, all the databses were ther with an exception of a dozen datasbes still suspect. S, I then applied "sp_attach_single_file_db : to repair those dozen databases and performed an immediate backup for all the databases. Right now, everything seems to be working but I just don't trust those drives. What do you think?
Regards,
Richard|||I would scrsap the old drives and rebuild something like:
Raid 1 System drives.
Raid 0 + 1 for data
Raid 1 for logs (different set of drives to data)
regular log and data backups to differnet discs
NT backup of 'backup discs' to tape.
Sleep at night as you need several discs to go pop at the same time to =get a real problem!
Good luck.
Mike John
"Richard M." <richard@.richardtheman.com> wrote in message =news:297A2516-6BC0-4B23-9F13-ADA4515EF88D@.microsoft.com...
> Hi ,
> > THank you for your reply. You are right! The "sp_attach_single_file_db =" did work, but with 300 DBs it would take for ever. However, as luck =may have it the hard drive on the SQL server containing the OS =completely crashed! It went dead. So, the cause seems to be a =combination of file curruption due to hardware failure. So, what I did =was create a new server and migrated the data and log files just before =the server completely died. On the new server, when I installed SQL and =attempted to recover by installing the exact version and replacing the =existing ystem databases witht he original so the server can see all the =databases, the server completely all the databases were suspect. Hence, =this means that allt eh files I transferred were corrupted some how. =Now, I have two options: > > A: Manually use "sp_attach_single_file_db " on all databases to =recover it since it seems to work or
> > B: Bring the old server back online... and attempt to rectify a hand =full of suspect databases.
> > > I choose B, however the OS drive was completely dead. Luckily the =drivers containing the data files and the otehr drive containg the log =files were OK. The server was then rebuilt, with a new OS drive. Win2K =server ws installed and surely it saw the other two drives with the data =and log files. I then installed SQL server and the updates. As luck may =have it, all the databses were ther with an exception of a dozen =datasbes still suspect. S, I then applied "sp_attach_single_file_db : to =repair those dozen databases and performed an immediate backup for all =the databases. Right now, everything seems to be working but I just =don't trust those drives. What do you think?
> > Regards,
> > Richard > > > > >