Showing posts with label combined. Show all posts
Showing posts with label combined. Show all posts

Monday, March 12, 2012

I take it back

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.

Sunday, February 19, 2012

I need help please! My Exception Handling is not working.

I need help please...

I am using exception handling and Transaction handling combined.
The code is written to delete a record from 2 different table.
The purpose of using exception and transaction handling combined is tomake sure that the record is deleted in BOTH table. If there is errorwhile deleting a record from one of the tables, it will rollback thedatabase to the original and will stop deleting any record.

However, The Transaction handling is not working. When error occurswhile deleting a record on table A, the code still delete a record fromone table B. The transaction.RollBack() doesn't work. This is my code:

Try
Conn= NewSqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
Conn.Open()
Trans = sConn.BeginTransaction

For Each row In GridView1.Rows
Dim sql As String = "SELECT * FROM Member
Using Cmd As New SqlCommand(sql, Conn, Trans)
SqlDataSource1.DeleteParameters("MemberID").DefaultValue =DropDownListMember.SelectedValue
SqlDataSource1.Delete()
SqlDataSource2.DeleteParameters("CarID").DefaultValue =DropDownListCar.SelectedValue
SqlDataSource2.Delete()
End Using
End If
Next
sTrans.Commit()
Label1.Text = "deleted."
Catch ex As Exception
If sTrans IsNot Nothing Then
sTrans.Rollback()
End If
Label1.Text = "error"
Return
Finally
If sConn IsNot Nothing Then
sConn.Close()
End If
End Try

soo much thanks in advanced!!!got my question answered!

I found it myself by trying change the codes. thanks all! (?)