BBS DataRelation <> Report Sharp Shooter


Author
Message
Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi,

i now made a little test project, but i am still not quite pulling this off.

This is how my project looks:

i believe the RechnungenBO.cs code is pretty correct now, but i cannot select the Datasource in the ReportManager:

I have uploaded my source code here:

http://www.ready3.net/ReportSS.zip

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Philipp.

You need to get an instance of your BBS onto your form. One way of doing it is to make your BBS show up in the toolbox and drop it on the form. For that, add the ToolboxItem attribute to your BBS code:

Then, rebuild your project, which will make your BBS appear in the toolbox. Drop it on your form and you will be able to choose it from the ReportManager Data Sources list:


Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi Ivan,

thanks, that solved this issue. however, i am now having the issue, that the child-related information is not accessible within the report designer.

what i get is this:

But what i really WANT to get is something like this:

Any Idea ?

Thanks !!

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Have you had a look at the sample I sent you last month?

http://forum.strataframe.net/FindPost20704.aspx

You will basically create a new property in your parent BO that will represent your child BBS:


Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Yes, i did that, its in the RechnungenBO.cs:

#region Private Fields

private static RechpositionenBBSBBS _Rechpositionen = new RechpositionenBBSBBS();

#endregion

#region Protected Methods

protected override MicroFour.StrataFrame.Business.FieldPropertyDescriptor[] GetCustomBindablePropertyDescriptors()

{

//-- Establish Locals

List<FieldPropertyDescriptor> r = new List<FieldPropertyDescriptor>();

//-- Include all of the base descriptors

try

{

r.AddRange(base.GetCustomBindablePropertyDescriptors());

}

catch (Exception)

{

}

//-- Add the custom descriptors

r.Add(new ReflectionPropertyDescriptor("Rechpositionen", typeof(RechpositionenBO)));

//-- Return results

return r.ToArray();

}

#endregion

#region Public Propertiers

public RechpositionenBBSBBS Rechpositionen

{

get

{

//-- Filter out the child records that match the current movie record

if (this.Count > 0)

{

_Rechpositionen.SourceBO.Filter = "RechkopfID = " + this.ID.ToString();

}

//-- Return the child items

return _Rechpositionen;

}

}

#endregion


Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
i noticed i build my test project different from the samples, so i created a new one which is now in-line to how the samples were build:

The one with the red underline is where i put the custom property for Rechpositionen.

Now when i run the project, i get a null-reference exception at the line:

r.Add(new ReflectionPropertyDescriptor("Rechpositionen", typeof(RechpositionenBO)));

"The Object reference not set to an instance of an object."

 

I have uploaded the new source code here:

http://www.ready3.net/ReportSS2.zip


Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
It looks like you forgot to override the AreCustomerDescriptorsEvaluated property:

    Private Shared _AreCustomDescriptorsEvaluated As Boolean = False

/// <summary>
/// Determine if the custom descriptors are going to be evaluated
/// </summary>
/// <remarks></remarks>
    protected override bool AreCustomDescriptorsEvaluated {
    get {
        //-- Establish Locals
        bool r = _AreCustomDescriptorsEvaluated;
       
        //-- Do not eval the desciptors again
        _AreCustomDescriptorsEvaluated = true;
       
        //-- Return results
        return r;
    }
}


Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Ivan George Borges (12/08/2008)
It looks like you forgot to override the AreCustomerDescriptorsEvaluated property:

    Private Shared _AreCustomDescriptorsEvaluated As Boolean = False

/// <summary>
/// Determine if the custom descriptors are going to be evaluated
/// </summary>
/// <remarks></remarks>
    protected override bool AreCustomDescriptorsEvaluated {
    get {
        //-- Establish Locals
        bool r = _AreCustomDescriptorsEvaluated;
       
        //-- Do not eval the desciptors again
        _AreCustomDescriptorsEvaluated = true;
       
        //-- Return results
        return r;
    }
}

Actually i allready have that:

namespace ReportSS2.ReportBinding

{

public class RechnungenBO : ReportSS2.RechnungenBO

{

#region Private Fields

private static bool _AreCustomDescriptorsEvaluated = false;

private static RechpositionenBBS _Rechpositionen = new RechpositionenBBS();

#endregion

#region Protected Methods

/// <summary>

/// Determine if the custom descriptors are going to be evaluated

/// </summary>

/// <remarks></remarks>

protected override bool AreCustomDescriptorsEvaluated

{

get

{

//-- Establish Locals

bool r = _AreCustomDescriptorsEvaluated;

//-- Do not eval the desciptors again

_AreCustomDescriptorsEvaluated = true;

//-- Return results

return r;

}

}


Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi there.

I'm facing some difficulties over here, since I don't speak neither German nor C#. Hehe

But I got to make your project work. Had to delete the instance of your RechungenBBS from the form, as there was some error there, I guess with namespaces or such. Also repaired some code and inheritance of BO, and it looks like working now:


Attachments
ReportSS2.zip (101 views, 3.00 MB)
Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi Ivan,

first off, thanks alot, this looks as intended. Can u provide some details of what you actually changed ? For example how you were able to rename RechnungenBO.cs to RechnungenReportBO.cs without breaking everything ?

I will try to create it from scratch again. I really need to know the way of getting there.

I used CustomBuisnessBindingSource to create the BBS and BO('s) within the ReportBinding namespace.

Thanks alot for your help.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search