Sunday, February 19, 2012

how to get fiels value in Code

Hello,
I wrote a function in vb.net and i Sent her parameter.
The function is used in a table cell.
I want the function to use a field value,
I tried :
Fileds!myFilesName.Value
But it didn't work.
Can I do this kind of thing?
Thanks.On Jul 1, 8:49 am, nicknack <roezo...@.gmail.com> wrote:
> Hello,
> I wrote a function in vb.net and i Sent her parameter.
> The function is used in a table cell.
> I want the function to use a field value,
> I tried :
> Fileds!myFilesName.Value
> But it didn't work.
> Can I do this kind of thing?
> Thanks.
I don't quite follow what you are requesting; however, to use a field
value from a report dataset, you would use an expression similar to
the following:
=Fields!FieldName.Value
If you are wanting to include custom code, you would utilize it in the
following way:
In the Layout view, select the Report drop-down menu. Select Report
Properties... Then select the Code tab and enter the code here.
Hopefully, this gives you a start.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi Martinez, Its look like I meet you on every question of mine (And I
am very glad for that :)
I'll will try to explain again:
I have a table in my report.
in one of the cells I have a filed. some thing like:
=Fields!FieldName.Value
Now, Let say I want to add him the value "2". I will use:
=Fields!FieldName.Value + 2
Now, let say that I want to call a function that will add him the
value "2" and return the result.
I can use the following call:
=Code.AddTwoFunction(Fields!FieldName.Value)
And in my code I will get the Filed value as parameter and add him the
2.
What I wanted to know is if I can call the function with out the
parameter and tell her to automaticlly get the value of the field from
the row she was called?
The reason I need this is that I have a function that need to get 5
fileds and when I call it it looks some thing like:
=Code.AddTwoFunction(Fields!FieldName.Value,Fields!
FieldName2.Value,Fields!FieldName3.Value,Fields!
FieldName4.Value,Fields!FieldName5.Value)
Hope I explain my self better.
Thanks again!
EMartinez :
> On Jul 1, 8:49 am, nicknack <roezo...@.gmail.com> wrote:
> > Hello,
> > I wrote a function in vb.net and i Sent her parameter.
> > The function is used in a table cell.
> > I want the function to use a field value,
> > I tried :
> > Fileds!myFilesName.Value
> >
> > But it didn't work.
> > Can I do this kind of thing?
> >
> > Thanks.
>
> I don't quite follow what you are requesting; however, to use a field
> value from a report dataset, you would use an expression similar to
> the following:
> =Fields!FieldName.Value
> If you are wanting to include custom code, you would utilize it in the
> following way:
> In the Layout view, select the Report drop-down menu. Select Report
> Properties... Then select the Code tab and enter the code here.
> Hopefully, this gives you a start.
> Regards,
> Enrique Martinez
> Sr. Software Consultant|||Hi,
On the similar lines, can I access other Report Items on the report namely
Line Object/Sub Report Object. I would like to read the Line Objects Vertical
position value or SubReports Height property.
Could you please help me on this.
Regards,
Sudhakara.T.P.
"nicknack" wrote:
> Hi Martinez, Its look like I meet you on every question of mine (And I
> am very glad for that :)
> I'll will try to explain again:
> I have a table in my report.
> in one of the cells I have a filed. some thing like:
> =Fields!FieldName.Value
> Now, Let say I want to add him the value "2". I will use:
> =Fields!FieldName.Value + 2
> Now, let say that I want to call a function that will add him the
> value "2" and return the result.
> I can use the following call:
> =Code.AddTwoFunction(Fields!FieldName.Value)
> And in my code I will get the Filed value as parameter and add him the
> 2.
> What I wanted to know is if I can call the function with out the
> parameter and tell her to automaticlly get the value of the field from
> the row she was called?
> The reason I need this is that I have a function that need to get 5
> fileds and when I call it it looks some thing like:
> =Code.AddTwoFunction(Fields!FieldName.Value,Fields!
> FieldName2.Value,Fields!FieldName3.Value,Fields!
> FieldName4.Value,Fields!FieldName5.Value)
> Hope I explain my self better.
> Thanks again!
> EMartinez :
> > On Jul 1, 8:49 am, nicknack <roezo...@.gmail.com> wrote:
> > > Hello,
> > > I wrote a function in vb.net and i Sent her parameter.
> > > The function is used in a table cell.
> > > I want the function to use a field value,
> > > I tried :
> > > Fileds!myFilesName.Value
> > >
> > > But it didn't work.
> > > Can I do this kind of thing?
> > >
> > > Thanks.
> >
> >
> > I don't quite follow what you are requesting; however, to use a field
> > value from a report dataset, you would use an expression similar to
> > the following:
> > =Fields!FieldName.Value
> > If you are wanting to include custom code, you would utilize it in the
> > following way:
> > In the Layout view, select the Report drop-down menu. Select Report
> > Properties... Then select the Code tab and enter the code here.
> > Hopefully, this gives you a start.
> >
> > Regards,
> >
> > Enrique Martinez
> > Sr. Software Consultant
>

No comments:

Post a Comment