Page 1 of 2

Problema with Drill Down with ConnectionString empty

Posted: Mon Jul 06, 2015 3:59 pm
by Saus86
Hi.
I'm using Stimulsoft Report.Net.
I'm using drilldown property to pass input parameters from a report to another report.

The problem is that I'm using a SQL Connection with a connection string empty and encrypted.
For this reason the drilldown between reports doesn't work.

Code: Select all

Here i post the example of sql connection with connection string empty and encrypted.
<Databases isList="true" count="1">
      <BravoReportConnection Ref="2" type="Stimulsoft.Report.Dictionary.StiSqlDatabase" isKey="true">
        <Alias>BravoReportConnection</Alias>
        <ConnectionStringEncrypted />     <------
        <Name>BravoReportConnection</Name>
      </BravoReportConnection>
    </Databases>
If I set normally a Connectionstring inside the report, the drilldown property works correctly but i must use the way above.
In practice I inject the Connectionstring from outside of the report in my C# program.

Here there is an example about injection:

Code: Select all

StiReport newReport = new Stimulsoft.Report.StiReport();
newReport.Load(@"C:\....\report.mrt");
if (ContainsCS(newReport.Dictionary.Databases, "TestReportConnection"))
{
((Stimulsoft.Report.Dictionary.StiSqlDatabase)newReport.Dictionary.Databases["TestReportConnection"]).ConnectionString = ">>MyconnectionString<<";
}
//not mandatory
newReport.Dictionary.Synchronize();
//show = compile+render
newReport.Show();
How can I propagate the connectionstring in the second report using a connection string empty and encrypted?

Thank you.
Andrea

Re: Problema with Drill Down with ConnectionString empty

Posted: Tue Jul 07, 2015 7:42 am
by HighAley
Hello, Andrea.

What problem do you have with drill-down? It's not clear.
What does not work?
Please, describe your issue more detailed.

Thank you.

Re: Problema with Drill Down with ConnectionString empty

Posted: Tue Jul 07, 2015 8:57 am
by Saus86
Both of report don't have a connection string written inside report but comes by outside.
When I launch the reports separately, I pass connectionstring with the code above and they work.


While I use drilldown (report1 -> report2), report1 has the connectionstring passed by me, while report2 (opened with drilldown) doesn't have connectionstring and so i don't see results.
How can i pass my connectionstring at report2 during drilldown operation?

Andrea

Re: Problema with Drill Down with ConnectionString empty

Posted: Tue Jul 07, 2015 10:30 am
by Saus86
No problem I resolved it.

Report1:

BeginRender() get connectionstring current report:

/Using for DrillDown
connectionString = ((Stimulsoft.Report.Dictionary.StiSqlDatabase)this.Dictionary.Databases.Items[0]).ConnectionString;

AfterPrint() Text_X set drilldown parameter:

//Using for DrillDown
DataBM_Teams_IdTeam.DrillDownParameters.Add("P_ConnectionString", connectionString);


Report2:

BeginRender() set connectionstring of the report2 with the connectionstring of the report1:

//Using for DrillDown
if(this["P_ConnectionString"] != null)
{
((Stimulsoft.Report.Dictionary.StiSqlDatabase)this.Dictionary.Databases["xxxxxx"]).ConnectionString = (string)this["P_ConnectionString"];
}

Re: Problema with Drill Down with ConnectionString empty

Posted: Tue Jul 07, 2015 12:05 pm
by HighAley
Hello.

Great!
Let us know if you need any additional help.

Thank you.

Re: Problema with Drill Down with ConnectionString empty

Posted: Mon Sep 14, 2015 3:07 pm
by Saus86
I have a similar problem using GlobalizationManager.

1) By code I set Globalization Manager and I set it in the report object:

StiReport report = new StiReport();
//Globalization using GM
report.GlobalizationManager = new GlobalizationManager("GlobalizedReport.MyResources",
new CultureInfo(cultureName));

2) And then i launch the first report:
report.Load("....pathreport");
report.Show();

3) Then i use drilldown parameter inside first report to launch the 2nd report.
Then I pass as parameter the GlobalizationManager object to the 2nd report (launched by the first report using drilldown property).

Example below:
TextName.DrillDownParameters.Add("P_GM", this.GlobalizationManager);

4) In the 2nd report I set this object (P_GM) in the BeginRender() event of report object. You see below:

this.GlobalizationManager = (Stimulsoft.Report.IStiGlobalizationManager)this["P_GM"];


In this way, when the 2nd report is showed, All strings are NOT translated:

CASE A - BY CODE) OK
The translations set by code are translated correctly.
Example:
event report BeginRender()
{
...
textname.text = this.GlobalizationManager.GetString("KeyName"); //OK
}

CASE B - USING "Globalized Name" PROPERTY) //NO TRANSLATION
While if I use "Globalized Name" property and I set a generic KeyName (like above: KeyName), the field is not translated with the text related to the KeyName.

How can I resolve it?

Thanks.
Andrea

Re: Problema with Drill Down with ConnectionString empty

Posted: Tue Sep 15, 2015 2:01 pm
by HighAley
Hello, Andrea.

Thank you for the detailed description but could you send us a sample project that reproduces both cases?
We need to analyze it to make any changes in our product.

Thank you.

Re: Problema with Drill Down with ConnectionString empty

Posted: Tue Sep 22, 2015 4:04 pm
by Saus86
I attach here the sample project in C# (.net framework 4.5).
The rar file includes the c# project and 2 reports (report1 and report2).

The bug is in the report2 below the header title "CaseB) - Using Globalized Name Properties - BUG".
The program automatically launches report1 in the selected culture and set GlobalizationManager.

Then i click in a text where I set drilldown and here I pass globalizationManager object to the 2nd report as parameter.
When report2 is launched I set in the begin render the object GlobalizationManager for the current report.

In the first green table, using GM by code (Beginrender event) texts are translated correctly while in the 2nd orange table texts are not translated but remain keynames because I used GlobalizedName properties.

Waiting an answer, thank you.

Re: Problema with Drill Down with ConnectionString empty

Posted: Wed Sep 23, 2015 1:20 pm
by HighAley
Hello.

Thank you for the sample. We have reproduced the issue.
We need some time for analysis.
We will let you know when we get any result.

Thank you.

Re: Problema with Drill Down with ConnectionString empty

Posted: Fri Sep 25, 2015 2:01 pm
by Ivan
Hello,

The problem is solved.
The patch will be available in the next release on the next week.

Thank you.