May 24 2010

Is there a way to get programmatic access to the columns of a ActiveReports detail section?

Hello,

I have a report in Data Dynamics ActiveReports for .NET. In this report I am programmatically setting the ColumnCount property of the detail section to X. The detail section has one databound textbox.

The ColumnDirection property of the detail section is set to AcrossDown and the and then the data binding mechanism automatically fills across with data after setting the DataSource and DataMember.

Here is the code...

Public Sub RunReport
        Dim count As Integer = 0

        ' ...    get count

        Detail1.ColumnCount = count

        Me.DataSource = ds
        Me.DataMember = ds.Tables(0).TableName

End Sub

That code works fine and the data is automatically filled across the report.

Now I need to alter the report and circle or highlight one of the items that is auto-filled across columns in the report.

I cannot find any way to programmatically access the auto-generated columns so I can turn on a border or draw a circle or something. Any ideas how I would do that?

Seth

May 11 2010

Help understanding .NET delegates, events, and eventhandlers

In the last couple of days I asked a couple of questions about delegates HERE and HERE. I confess...I don't really understand delegates. And I REALLY REALLY REALLY want to understand and master them. (I can define them--type safe function pointers--but since I have little experience with C type languages it is not really helpful.)

Can anyone recommend some online resource(s) that will explain delegates in a way that presumes nothing?

This is one of those moments where I suspect that VB actually handicaps me because it does some wiring for me behind the scenes.

The ideal resource would just explain what delegates are, without reference to anything else like (events and eventhandlers), would show me how all everything is wired up, explain (as I just learned) that delegates are types and what makes them unique as a type (perhaps using a little ildasm magic)). That foundation would then expand to explain how delegates are related to events and eventhandlers which would need a pretty good explanation in there own right. Finally this resource could tie it all together using real examples and explain what wiring DOES happen automatically by the compiler, how to use them, etc. And, oh yeah, when you should and should not use delegates, in other words, downsides and alternatives to using delegates.

What say ye? Can any of you point me to resource(s) that can help me begin my journey to mastery?

EDIT One last thing. The ideal resource will explain how you can and cannot use delegates in an interface declaration. That is something that really tripped me up.

Thanks for your help.

Seth

May 11 2010

Help understanding .NET delegates, events, and eventhandlers

In the last couple of days I asked a couple of questions about delegates HERE and HERE. I confess...I don't really understand delegates. And I REALLY REALLY REALLY want to understand and master them. (I can define them--type safe function pointers--but since I have little experience with C type languages it is not really helpful.)

Can anyone recommend some online resource(s) that will explain delegates in a way that presumes nothing?

This is one of those moments where I suspect that VB actually handicaps me because it does some wiring for me behind the scenes.

The ideal resource would just explain what delegates are, without reference to anything else like (events and eventhandlers), would show me how all everything is wired up, explain (as I just learned) that delegates are types and what makes them unique as a type (perhaps using a little ildasm magic)). That foundation would then expand to explain how delegates are related to events and eventhandlers which would need a pretty good explanation in there own right. Finally this resource could tie it all together using real examples and explain what wiring DOES happen automatically by the compiler, how to use them, etc. And, oh yeah, when you should and should not use delegates, in other words, downsides and alternatives to using delegates.

What say ye? Can any of you point me to resource(s) that can help me begin my journey to mastery?

EDIT One last thing. The ideal resource will explain how you can and cannot use delegates in an interface declaration. That is something that really tripped me up.

Thanks for your help.

Seth

May 11 2010

Comment by Seth Spearman on Unbound Forms: Add/Edit questions

Mohgeroth, I think your question is a bit confusing and not very clear. I "THINK" what you are asking is how do I use Access continuous forms without using data binding? Is that what you are asking? See if you can re-phrase your question to one sentence. Maybe change your title. Seth
May 09 2010

Comment by Seth Spearman on How do you do an assignment of a delegate to a delegate in .NET 2.0

Thanks...I also updated the title to reflect that.
May 07 2010

How do you pass a generic delegate argument to a method in .NET 2.0

Hello,

I have a class with a delegate declaration as follows...

Public Class MyClass  
    Public Delegate Function Getter(Of TResult)() As TResult    

    ''#the following code works.
    Public Shared Sub MyMethod(ByVal g As Getter(Of Boolean))
        ''#do stuff
    End Sub
End Class

However, I do not want to explicitly type the Getter delegate in the Method call. Why can I not declare the parameter as follows...

... (ByVal g As Getter(Of TResult))

Is there a way to do it?

My end goal was to be able to set a delegate for property setters and getters in the called class. But my reading indicates you can't do that. So I put setter and getter methods in that class and then I want the calling class to set the delegate argument and then invoke. Is there a best practice for doing this.

I realize in the above example that I can set set the delegate variable from the calling class...but I am trying to create a singleton with tight encapsulation.

For the record, I can't use any of the new delegate types declared in .net35.

Answers in C# are welcome.

Any thoughts?

Seth

May 06 2010

Vote to give this idea 50K: Ma…

Vote to give this idea 50K: Make fresh produce available to neighborhoods without access to stores #pepsirefresh http://pep.si/au4Dk8