auto relation in Data Bands

Stimulsoft Reports.NET discussion
ngaheer
Posts: 44
Joined: Sat Jul 22, 2006 1:12 am
Location: San Jose

auto relation in Data Bands

Post by ngaheer »

Hi Edward,

Having an event when a band is dragged onto the designer will be good. From the event if I can get the band being dragged and the datasource on that band. Finally if I can query all the existing databands dragged onto the designer, I can then set the data band relations programmatically as well as master component on the band that was dragged. I have not yet seen various API support to get all bands placed on the report/ setting band relations etc, so we would need that API as well if it does not currently exist.


We are supporting the Report designer wizard in our application as well. In that sceanrio, user is not dragging bands but they are placed automatically by report wizard. In this scenario, it would be nice to get a hook to set those data band relations/ master component when the wizard finishes.

Having above support will really help us simplify the report designing process for our end users and we are looking forward to have this feature available in near future so that we can accomplish what we want to do, before we release our application.

Thanks in advance.
Narinder.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

auto relation in Data Bands

Post by Edward »

Ok, we will inform you when this API is available.

Thank you.
ngaheer
Posts: 44
Joined: Sat Jul 22, 2006 1:12 am
Location: San Jose

auto relation in Data Bands

Post by ngaheer »

Hi Edward,

Can you please give us an ETA no when do you think these APIs will be available. I just need a probable date so that I can tell our client when the feature will be available.

Thanks for your help.

Narinder.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

auto relation in Data Bands

Post by Vital »

Hello,

We have added static event:

Code: Select all

StiOptions.Engine.GlobalEvents.ComponentCreated
Thank you.
munishsethi
Posts: 20
Joined: Fri Jun 01, 2007 11:10 pm
Location: India

auto relation in Data Bands

Post by munishsethi »

Hi,

Thanks. We downloaded the latest pre-release version and noticed an event StiOptions.Engine.GlobalEvents.ComponentCreated.

However this events gets fired as soon as the drag starts. That is an issue for us because what we need is an event when the compontent is actually dragged onto the desginer. I am not sure if that is some thing you guys are willing to accomodate, but this is what we will need.

Secondly, we were able to cast the component to StiDataBand because we were trying to drag a table from our data source. Now when we look inside this DataBand by trapping the CompontentCreated event, we don't see value for property "DataSourceName". We were expecting here the name of the table which was dragged.

Our main goal is to

a) trap the name of the table for the band that was dragged onto the designer.
b) Set the master component and data relation on this StiBand based on the relations in our DataSet.

Looks like the DataRelation and MasterComponent properties are read only. Can you please us how can set these two very important properties using the StiBand object and if the ComponentCreated event can be fired when the component actually gets dragged onto the designer.

Thanks for your help in this matter.








Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

auto relation in Data Bands

Post by Edward »

munishsethi wrote:Hi,

Thanks. We downloaded the latest pre-release version and noticed an event StiOptions.Engine.GlobalEvents.ComponentCreated.

However this events gets fired as soon as the drag starts. That is an issue for us because what we need is an event when the compontent is actually dragged onto the desginer. I am not sure if that is some thing you guys are willing to accomodate, but this is what we will need.
Yes, it is true, this event fires only when the DataBand is dropped to the page. When we start to drag the DataSource then the DataBand already created before we place the DataBand on the page. We work on the other way now.
munishsethi wrote: Secondly, we were able to cast the component to StiDataBand because we were trying to drag a table from our data source. Now when we look inside this DataBand by trapping the CompontentCreated event, we don't see value for property "DataSourceName". We were expecting here the name of the table which was dragged.

Our main goal is to

a) trap the name of the table for the band that was dragged onto the designer.
b) Set the master component and data relation on this StiBand based on the relations in our DataSet.

Looks like the DataRelation and MasterComponent properties are read only. Can you please us how can set these two very important properties using the StiBand object and if the ComponentCreated event can be fired when the component actually gets dragged onto the designer.

Thanks for your help in this matter.
Your goal is clear. We will inform you when the solution be available in this topic.

Thank you.





[/quote]
munishsethi
Posts: 20
Joined: Fri Jun 01, 2007 11:10 pm
Location: India

auto relation in Data Bands

Post by munishsethi »

Hi Edward,

Can you please tell us an ETA of when you think an API support will be available for this feature?

Thanks.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

auto relation in Data Bands

Post by Edward »

Sorry but realizing this feature is impossible in the current version of the Stimulsoft Reports.Net due to engine limitations.

Adding this feature requires total rebuilding the engine, so in the nearest feature we won't provide any solution in that field.

Thank you.
munishsethi
Posts: 20
Joined: Fri Jun 01, 2007 11:10 pm
Location: India

auto relation in Data Bands

Post by munishsethi »

Hi Edward,

I understand that it may involve a lot of work. Is there an alternative approach we can pick i.e. other than using the API? Also, I was curious, doesn't the stimulsoft report designer control call some api on the bands to set the relations/ master component.

One alternative i was thinking of was modifying the XML directly to set the relations/ master component.

Narinder
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

auto relation in Data Bands

Post by Vital »

In build from 13 Nov we have added new global events - StiOptions.Engine.GlobalEvents.DataSourceAssigned. Sample of using:

Code: Select all

private void OnDataSourceAssigned(object sender, EventArgs e)
{
  StiDataBand dataBand = sender as StiDataBand;
  if (dataBand != null && dataBand.IsDesigning)
  {
     dataBand.DataRelation = .....
  }
}
I hope this helps.

Thank you.
Post Reply