i need save, and local one report

Stimulsoft Reports.NET discussion
Post Reply
miguels
Posts: 27
Joined: Tue Jun 23, 2009 5:05 pm

i need save, and local one report

Post by miguels »

hi, i need you help pls...

hello I have a problem with the methods for saving and opening a report .... in stimulsoft.net

my problem is that I'm programming both recording methods such as opening an existing one .. and that within each method I have code that needs to be performed ... and in some times if funsion well but others are open 2 times ...

example
when I have opened a report and give an opening to charge designed, OpenDialog I have it in the designer's method but selecting the file to load me OpenDialog redisplay

This is my declaration

StiDesigner.LoadingReport += new StiLoadingObjectEventHandler(StiDesigner_LoadingReport);


this is my method of opening

void StiDesigner_LoadingReport(object sender, StiLoadingObjectEventArgs e)
{
this.Cursor = Cursors.WaitCursor;
e.Processed = false;
OpenFileDialog dlopen = new OpenFileDialog();
dlopen.Filter = "Archivos de Informes(*.mrt)|*.mrt";
dlopen.RestoreDirectory = true;

if (dlopen.ShowDialog() == DialogResult.OK)
{
if (dlopen.FileName.ToString() != null)
{
rutareporte = dlopen.FileName.ToString();
report.Load(rutareporte);

report.Dictionary.Databases.Items[0].Alias = bd;
report.Dictionary.Databases.Items[0].Name = bd;
SqlconD = new SqlConnection("Server=" + ip + ";database=" + bd + ";uid=" + usudis + ";password=" + pasdis + ";");
if (report.Dictionary.DataSources.Count > 0)
{
for (int i = 0; i < report.Dictionary.DataSources.Count; i++)
{ ((Stimulsoft.Report.Dictionary.StiDataStoreSource)report.Dictionary.DataSources.Items).NameInSource = bd; }
}

StiSqlDatabase conn = new StiSqlDatabase(bd, SqlconD.ConnectionString);
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(conn);
}
}
this.Cursor = Cursors.Default;
}

and the method of gruadar dcentro I have something similar in the remote method calls a form and that sometimes there will be 2 times or save dialog

mepuedas hopefully help you see how to cancel CALLS of the methods of the designer and give me only that I will schedule Manually
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

i need save, and local one report

Post by Alex K. »

Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
Post Reply