I want to use C# syntax in report expressions.
I use WinForms ReportViewer in local mode.
How to use C# instead of VB.NET syntax ?
I'm thinking about the following approaches:
1. Create pre-processor which converts expressions in RDL file from C# to
VB. NET
2. Replace all expressions with a method which takes C# expression as string
parameter, evaluates it and returns result.
Any idea how to implement this ?
Where to find any samples of C# expression evaluator or C# VB .NET
expression converter ?
Andrus.On Mar 27, 4:34 am, "Andrus" <kobrule...@.hot.ee> wrote:
> I want to use C# syntax in report expressions.
> I use WinForms ReportViewer in local mode.
> How to use C# instead of VB.NET syntax ?
> I'm thinking about the following approaches:
> 1. Create pre-processor which converts expressions in RDL file from C# to
> VB. NET
> 2. Replace all expressions with a method which takes C# expression as string
> parameter, evaluates it and returns result.
> Any idea how to implement this ?
> Where to find any samples of C# expression evaluator or C# VB .NET
> expression converter ?
> Andrus.
I, myself, come from a C# background and needed to learn some basic
VB.NET for expressions in order to use SSRS 2005. Aside from basic
syntax, the two are highly similar. It doesn't seem like the time to
become familiar w/the report expressions, etc in VB.NET would be as
much of a trade off when compared to a custom C# to VB.NET expression
converting application. That said, here's one I found:
http://www.tangiblesoftwaresolutions.com/Product_Details/Instant_VB/Instant_VB.htm
Also, several are mentioned here:
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/b4787e2e70c0b9df/6ec64748dea02d40?lnk=st&q=C%23+to+vb.net+conversion&rnum=4#6ec64748dea02d40
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||> It doesn't seem like the time to
> become familiar w/the report expressions, etc in VB.NET would be as
> much of a trade off when compared to a custom C# to VB.NET expression
> converting application.
I noticed that I must write code in <Code> tags in VB .NET also.
So using reporting services requires learning full VB .NET language, not
only expressions.
I have read everywhere that .NET allows to select between C# and VB .NET
When this is fixed so that C# language can be used in RDLC files ?
Andrus.|||> I noticed that I must write code in <Code> tags in VB .NET also.
>So using reporting services requires learning full VB .NET language, not
>only expressions.
Really not true, or at least certainly not a big deal, if you put your code
in custom DLLs instead of embedding it in the report. Which you would
probably want to do for non-trivial code anyway. So put your code in custom
DLLs in C#, and go as crazy as you want creating custom functions (in C#)
which you can call in your report for anything where the built-in VB
functions seem non-intuitive or not effective from your POV.
>L<
"Andrus" <kobruleht2@.hot.ee> wrote in message
news:OWlLZNHcHHA.2120@.TK2MSFTNGP03.phx.gbl...
>> It doesn't seem like the time to
>> become familiar w/the report expressions, etc in VB.NET would be as
>> much of a trade off when compared to a custom C# to VB.NET expression
>> converting application.
> I noticed that I must write code in <Code> tags in VB .NET also.
> So using reporting services requires learning full VB .NET language, not
> only expressions.
> I have read everywhere that .NET allows to select between C# and VB .NET
> When this is fixed so that C# language can be used in RDLC files ?
> Andrus.
No comments:
Post a Comment