Monday, March 19, 2012
BUG Multi-value field in SP2
There seems to be a bug with the multi-valed fields when only one value is
selected and that value contains only spaces. I get the message 'Please
select a value for the parameter...'. It works when I test it in Visual
Studio but it doesn't work on the Web. I'm using SQL Server 2005 with SP2.
Any ideas ? Suggestions ?
Regards
AlainOn Apr 6, 12:05 pm, "Alain Magnan" <AMag...@.Hatch.caGARBAGE> wrote:
> Hi,
> There seems to be a bug with the multi-valed fields when only one value is
> selected and that value contains only spaces. I get the message 'Please
> select a value for the parameter...'. It works when I test it in Visual
> Studio but it doesn't work on the Web. I'm using SQL Server 2005 with SP2.
> Any ideas ? Suggestions ?
> Regards
> Alain
Are you using 2 columns in the dataset that sources the multi-select
parameter? If the value field is something like 0, it might not error
out. Something like this might work (in the dataset; where Name is the
displayed item and NameID is the parameter value):
Name NameID
" " 0
"Bob" 1
"John" 2
"Bill" 3
Hope this is helpful.
Regards,
Enrique Martinez
Sr. Software Consultant
Friday, February 24, 2012
Browser Refresh
"Render this report with the most recent data"->"Cache a temporary *" is
selected.
It also refreshes around every 30 seconds when nothing is selected. Has
anyone had an similar issue, I've done a little searching, is their a way to
disable auto-browser refresh entierly?Check if AutoRefresh is selected in the 'Report Properties'.. may be it is
set to 2 seconds..
"Sean Edwards" <Sean Edwards@.discussions.microsoft.com> wrote in message
news:DA2C5B96-DF80-4887-99AF-D87B573EBC00@.microsoft.com...
> The browser refreshes every 2 seconds when
> "Render this report with the most recent data"->"Cache a temporary *" is
> selected.
> It also refreshes around every 30 seconds when nothing is selected. Has
> anyone had an similar issue, I've done a little searching, is their a way
to
> disable auto-browser refresh entierly?|||Thanks, I didn't even realize you could set the reports cache inside of
Visual.net
"RK Balaji" wrote:
> Check if AutoRefresh is selected in the 'Report Properties'.. may be it is
> set to 2 seconds..
>
> "Sean Edwards" <Sean Edwards@.discussions.microsoft.com> wrote in message
> news:DA2C5B96-DF80-4887-99AF-D87B573EBC00@.microsoft.com...
> > The browser refreshes every 2 seconds when
> > "Render this report with the most recent data"->"Cache a temporary *" is
> > selected.
> >
> > It also refreshes around every 30 seconds when nothing is selected. Has
> > anyone had an similar issue, I've done a little searching, is their a way
> to
> > disable auto-browser refresh entierly?
>
>
Thursday, February 16, 2012
Bring a data that not already selected...
Hi I have a problem that seems to be stupid… but still I cant solve it so please if you can help ASAP I'll appreciated.
Its 2 tables "Courses" and "Facilitators"
The Course table contain: Course_Id and Course_Name
The Facilitators table contain: Facili_Id and Facili_Name
The two tables have (many to many) relation between them.
So I split them into a 3rd table called "Trans" which contain the PK from each Table
That will be : "Trans_Course_Id" and "Trans_Facili_Id"
I put some data on each table… at least 3 records and related some of them in the "Trans" table
Now im looking for an SQL command that brings me All the "Facili_ID" and "Facili_Name" for a specific course. And only those who is not already selected by the same course?
Like if I have the data in the "Courses" table
id: 1 and Name: VB
Id:2 and Name: C#
And in "Facilitators" table:
Id:1 and Name: Adam
Id:2 And Name: George
Id:3 and Name: Sam
Now in the relation table "Trans"
Course_Id:1 and Facili_Id:1
Course_Id:2 and Facili_Id:1
Course_Id:2 and Facili_Id:3
Now I want the SQL Commands that brings me the he "Facili_ID" and "Facili_Name"
For Course_id "For example" and should not be selected by the same course…
That would be:
Id:2 And Name: George
Id:3 and Name: Sam
And the same for eash time I pass the course_id for the command
Thank you.
I'm lost. I see your example data, but I don't see how you get George and Sam using any thing that remotely resembles what you've explained. Explain again, and I'm sure I can get you the T-SQL.
|||Ok… its just only wanted to get all the data that not already selected by a cretin course.
lets say that the course id 1 has select a facilitator id 1 now I want the sql command that brings me all the facilitator id's except the facilitator id 1 for the course id 1 .
ill explain to you what I do exactly
I have a form that brings all a certain course information and a data grid that show the facilitator id's and names for that course.
Now when the admin want to add another facilitator for this course he press a button that will create a child window contain a LOV "list of value" as a data grid contain all the facilitator id's and names that not already selected by that certain course in the parent window "data grid"….
??
I think I see...
So if the statement:
SELECT facil_id from trans WHEREcourse_id=@.course_id
returns to you the facilitators, then
SELECT *
FROM Facilitators
WHERE facil_id NOT IN (SELECT facil_id FROM trans WHEREcourse_id=@.course_id)
will return you all the facilitators that aren't part of the course id you passed in... Does that answer your question?
|||Will. You know I have to do it in one select statement
So what I did is :
SELECT facilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id = [transaction_ facilitators].trans_Facilitator_id
WHERE (facilitators.facilitator_id NOT IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM transaction_ facilitators
WHERE [transaction_ facilitators].trans_Course_id = @.p1))
ORDER BY facilitators.facilitator_id
But that didn't work :( …
I know the answer is some where here but I can't catch it.
|||OK this one work great:
SELECT facilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id <> [transaction_ facilitators].trans_Facilitator_id
WHERE (NOT (facilitators.facilitator_id IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM [transaction_ facilitators]
WHERE [transaction_ facilitators].trans_Course_id = 2)))
GROUP BY facilitators.facilitator_id, facilitators.facilitator_name
ORDER BY facilitators.facilitator_id
But when I want to pass a parameters to "[transaction_ facilitators].trans_Course_id = @.p1"
This gives me an error:
Incorrect syntax near the keyword "From"
Any suggestion ??
|||Maybe you misunderstood. The statement:
SELECT *
FROM Facilitators
WHERE facil_id NOT IN (SELECT facil_id FROM trans WHEREcourse_id=@.course_id)
should be all you need.
|||SELECT facilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id <> [transaction_ facilitators].trans_Facilitator_id
WHERE (NOT (facilitators.facilitator_id IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM [transaction_ facilitators]
WHERE [transaction_ facilitators].trans_Course_id = 2)))
GROUP BY facilitators.facilitator_id, facilitators.facilitator_name
ORDER BY facilitators.facilitator_id
Every thing goes right until I change this:
WHERE [transaction_ facilitators].trans_Course_id = 2
To
WHERE [transaction_ facilitators].trans_Course_id = @.course_id
It gives me this error:
Incorrect syntax near the keyword "From"
still gives me the same error
|||Unbalanced parenthesis.
You are also using group by with no aggregates -- Which does the same thing as distinct.
SELECT DISTINCTfacilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id <> [transaction_ facilitators].trans_Facilitator_id
WHERE (NOT (facilitators.facilitator_id IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM [transaction_ facilitators]
WHERE [transaction_ facilitators].trans_Course_id = @.course_id))
ORDER BY facilitators.facilitator_id
:( That's unbelievable… its not working what is this… look I try this:
SELECT DISTINCT facilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id <> [transaction_ facilitators].trans_Facilitator_id
WHERE (NOT (facilitators.facilitator_id IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM [transaction_ facilitators]
WHERE [transaction_ facilitators].trans_Course_id = @.course_id)))
ORDER BY facilitators.facilitator_id
Not Working the same error: "Incorrect syntax near the keyword "From"
"
And I try this:
SELECT DISTINCT facilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id <> [transaction_ facilitators].trans_Facilitator_id
WHERE (NOT (facilitators.facilitator_id IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM [transaction_ facilitators]
WHERE [transaction_ facilitators].trans_Course_id = @.course_id)))
GROUP BY facilitators.facilitator_id, facilitators.facilitator_name
ORDER BY facilitators.facilitator_id
Not Working the same error: "Incorrect syntax near the keyword "From"
"
And I try this:
SELECT facilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id <> [transaction_ facilitators].trans_Facilitator_id
WHERE (NOT (facilitators.facilitator_id IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM [transaction_ facilitators]
WHERE [transaction_ facilitators].trans_Course_id = ?)))
GROUP BY facilitators.facilitator_id, facilitators.facilitator_name
ORDER BY facilitators.facilitator_id
Not Working the same error: "Incorrect syntax near the keyword "From"
"
And I try this:
SELECT facilitators.facilitator_id, facilitators.facilitator_name
FROM facilitators INNER JOIN
[transaction_ facilitators] ON facilitators.facilitator_id <> [transaction_ facilitators].trans_Facilitator_id
WHERE (NOT (facilitators.facilitator_id IN
(SELECT [transaction_ facilitators].trans_Facilitator_id
FROM [transaction_ facilitators]
WHERE [transaction_ facilitators].trans_Course_id = ?)))
ORDER BY facilitators.facilitator_id
Not Working the same error: "Incorrect syntax near the keyword "From"
"
Nothing work what is this… is it a curse ?
I don't have more time :'(… HELP