on 10-16-2008 9:17 AM
Hello,
I'd like to know how i can get a fieldobject value in a CR with VS 2008 ?
Of course, there is an error fldObject.Value does not exist.
My code sample :
For Each rptobject As ReportObject In cr.ReportDefinition.ReportObjects
Select Case rptobject.Kind.ToString
Case "FieldObject"
Dim fldObject As FieldObject = rptobject
If fldObject.Name.StartsWith("Avance") Then
If Not String.IsNullOrEmpty(fldObject.Value) Then
If IsNumeric(fldObject.Value) Then
Dim taux As Int32 = CType(fldObject.DataSource.Name, Int32)
taux = taux / 100
Dim taille As Int32 = fldObject.Width * taux
fldObject.Width = taille
End If
End If
End If
End Select
Next
Thanks per advance
Eric
Hi, Eric;
This approach will not work, as you cannot have a field be a different width for each record. As far as the report is concerned, the field has one width, and that would be constant throughout.
Regards,
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the actual problem you are trying to solve? As Jon mentioned you can't change the width of a field on a per record basis. Why not just make the width of the field wide enough for all possible data?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.