Click here to Skip to main content
15,896,541 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

We have a report designer project which uses Active Reports.
We want to use SubReport tool of the Active Reports.
Subreport control has a "report" property which fills the ActiveReport content of the Subreport.
Since we have a designer project and a SubReport tool,
I want to add a property to the SubReport control which opens a new form that enables user to choose a report from the list and load report into the SubReport control.

So how can I add a property to a control which opens a new windows form?

Thanks in advance
Posted

1 solution

Hi...

You need to create user control with that control, then you can define new properties.
 
Share this answer
 
Comments
kubi081 2-Aug-12 8:49am    
//SubReport control properties are set as follows:

public class SubReportProp
{
private DataDynamics.ActiveReports.SubReport _SubReport;

public SubReportProp(DataDynamics.ActiveReports.SubReport subReport, List<string> fieldCollection)
{
this._SubReport = subReport;

if (fieldCollection != null && fieldCollection.Count > 0)
{
FieldVars._DataFields = fieldCollection;
}
}

[DisplayName("X")]
[Description("Kontrolün yatay konumunu getirir veya ayarlar.")]
[Category("Konum")]
public float X
{
get
{
return SharedProp.TrimFloatValue(ActiveReport.InchToCm(_SubReport.Location.X));
}
set
{
_SubReport.Location = new PointF(ActiveReport.CmToInch(value), _SubReport.Location.Y);
}
}

[DisplayName("Y")]
[Description("Kontrolün dikey konumunu getirir veya ayarlar.")]
[Category("Konum")]
public float Y
{
get
{
return SharedProp.TrimFloatValue(ActiveReport.InchToCm(_SubReport.Location.Y));
}
set
{
_SubReport.Location = new PointF(_SubReport.Location.X, ActiveReport.CmToInch(value));
}
}
}

//like this x , y coordinates I also need to add another property which enables user to choose a report from a list and apply to _SubReport.Report

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900