Drilldown Reports

Stimulsoft Reports.NET discussion
Post Reply
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Drilldown Reports

Post by Guest »

Hi All

I have one report that, when I click on a Component I open a new report.. Here are the code

public override void OnPrepare()
{
this.Cursor = Cursors.WaitCursor;

// Selection
StringBuilder sel = new StringBuilder();
sel.Append("Cashbook: " + this.CBook.Text + "; ");
sel.Append("Year no: " + YearNo.Value.ToString() + "; ");
sel.Append("Period no" + this.PeriodNo.Value.ToString());

General_Ledger_Casbook Rep = new General_Ledger_Casbook();

StiPostgreSQLDatabase db = (StiPostgreSQLDatabase)Rep.Dictionary.Databases[0];
db.EditConnectionString(DAL.ConString);

Rep["CpyFP"] = Company.Value.ToString();
Rep["CpyID"] = Company.Text;
Rep["CBookFP"] = this.CBook.Value.ToString();
Rep["YrNo"] = Convert.ToInt32(YearNo.Value);
Rep["PerNo"] = Convert.ToInt32(this.PeriodNo.Value);
Rep["Selection"] = sel.ToString();
Rep["User"] = UserDD.UserFullName;

Rep.Click += new EventHandler(GLCBook_Click);

Rep.Show();

this.Cursor = Cursors.Default;
}


#region GLCBook_Click
void GLCBook_Click(object sender, EventArgs e)
{
this.Cursor = Cursors.WaitCursor;

StiComponent Comp = sender as StiComponent;
string Fingerprint = (string)Comp.TagValue;

if (Fingerprint != null)
{
General_Ledger_Cashbook_Details Rep = new General_Ledger_Cashbook_Details();

//StiPostgreSQLDatabase db = (StiPostgreSQLDatabase)Rep.Dictionary.Databases[0];
//db.EditConnectionString(DAL.ConString);

Rep["CpyID"] = Company.Text;
Rep["CBookID"] = this.CBook.Text;
Rep["Fingerprint"] = Fingerprint;
Rep["User"] = UserDD.UserFullName;

Rep.Show();
}

this.Cursor = Cursors.Default;
}
#endregion

Every thing work fine, excep when I uncomment this...
//StiPostgreSQLDatabase db = (StiPostgreSQLDatabase)Rep.Dictionary.Databases[0];
//db.EditConnectionString(DAL.ConString);

in "void GLCBook_Click(object sender, EventArgs e)" the New report display Progress Dialog and just hang. Other wyse it works fine.


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

Drilldown Reports

Post by Edward »

We couldn't reproduce the issue.

If possible, send to us a test application, please.

Thank you.
mihiri
Posts: 13
Joined: Thu Jun 12, 2008 4:43 am
Location: Manama,bahrain

Drilldown Reports

Post by mihiri »

Hello,
I also want to do the same thing that you have done.(click on a Component -> open a new report)
Would you please be kind enough to give me the code, so that i can refer it?
I do not understand where you put this code you have quoted here.
Thanks so much in advance.
mihiri
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Drilldown Reports

Post by Vital »

Hello,

Please see sample project LiveReports from standard delivery.

Thank you.
Post Reply