Sunday, March 11, 2012
Crystal Report Problem Need help.
However i'm just confuse why is it the the report doesn't display the right filtering.
Let say in this code, I would just like to filter out Such as student no..
I just added DataGrid in the form, fortunately its working fine.
Please I need your help guys. Am I writing my crystal report correct?
Thanks...
[code]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call LoadCrSingle(TextBox1.Text)
End Sub
Function LoadCrSingle(ByVal StudentNumber As String)
Dim CrDocument As ClaimStub 'name of crystal report
Dim DsetSingle As New dsStudents
Try
''Build a SQL statement to query the datasource
DsetSingle.Clear()
Dim SqlStr As String = "SELECT REQID, DOC_CODE, STUD_NO FROM Requests where Stud_No ='" & UCase(StudentNumber) & "'"
''Retrieve the data using the SQL statement
Dim Adapt = New OleDbCommand(SqlStr, sqlcon)
Dim da = New OleDbDataAdapter(Adapt)
''Create a instance of a Dataset
''of the table in the report.
da.Fill(DsetSingle, "Requests")
''Pass the dataset to the report
CrDocument = New ClaimStub 'make new fill dataset
CrDocument.Database.Tables(0).SetDataSource(DsetSingle)
''View the report
CRViewer.ReportSource = CrDocument
DataGrid1.DataSource = DsetSingle.REQUESTS
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, Me.Text)
End Try
End Function
[code]Open the file and in the menu File, uncheck the option Save Data with Reports
Tuesday, February 14, 2012
Cross dimension security filtering
If i have for example dimensions like Country and City (both containing a huge list). If i don't set a hierarchy for this and i create a report and i filter on Country and my second filter is City than i will get ALL city's listed instead of only the city's in the Country i've selected in my first filter.
We can easily fix this by making a hierarchy.
But my problem is now that my cube contains 15 dimensions and i want them all to filter each other in the dimension list in my reports. I cannot build one hierarchy that covers everything. Isn't there an alternative way to make dimensions filter each other as parameters ?
I've researched this for a while now and i'm starting to think there is no other way which is a huge sitback for analysis services as now people who only have access to the country Netherland can see all SalesRepresentatives from all over the world. I would have to add a hierarchy to filter them out but its not that easy. Certain SalesReps are in multiple country's and versa vi. This is only one of my problem dimensions i have alot of them like this. There should be a way that they automaticly filter each other without hierarchy building. But that is impossible right ?
Take a look at the NON EMPTY keyword. I think you'll find what you are looking for there.
There is also a NONEMPTY function. (Note the lack of a space between the two words.) That function, the EXISTS function, and the EXISTING keyword have behaviors you might also find helpful in different scenarios.
Good luck,
Bryan