Question on putting xml data into the report built from xml only
Question on putting xml data into the report built from xml only
Hi !
As we continue to integrate StimulSoft in our product, we have 2 new questions.
1- We see you release new builds continuously and we were told that you had fixed an issue with images from text while text.lenght was 0. We would like to have that fix in our engine to have better stability, but we didn't find any procedure of how to install those dlls.
2- We create our reports templates using our exported xml data only. When we then use the template to populate the report with a new xml and send it to printer, it keeps showing the data that was used while making the template. The code i'm using right now is below, what else can i try to have the new data in the report instead of the old ? I write down the xml used for the printing in a file and the xml data is fine, it's the report that doesn't get it.
Thanks for your great support !
Sacha
**************
private static StiReport InitializeReport(MemoryStream xmlData, PrintSessionInfo sessionInfo)
{
StiReport stiReport = new StiReport();
StiOptions.Engine.GlobalEvents.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(OnGetValue);
StiOptions.Engine.HideExceptions = false;
StiOptions.Engine.HideMessages = false;
StiOptions.Engine.LogEnabled = true;
StiOptions.Engine.TraceEnabled = true;
xmlData.Position = 0;
DataSet dataset = new DataSet();
dataset.ReadXml(xmlData);
stiReport.Load(sessionInfo.SummaryReportPath);
stiReport.Dictionary.DataStore.Clear();
stiReport.RegData(dataset);
stiReport.Dictionary.Synchronize();
//Set page orientation if not a custom report
if(!sessionInfo.IsCustomSummaryReport)
{
foreach(StiPage page in stiReport.Pages)
{
page.Orientation = sessionInfo.IsLandscape ? StiPageOrientation.Landscape : StiPageOrientation.Portrait;
}
}
stiReport.PrinterSettings.ShowDialog = false;
stiReport.Compile();
stiReport.CompiledReport.Rendering += new EventHandler(OnRendering);
stiReport.Render(false);
return stiReport;
}
And then call print on the report.
As we continue to integrate StimulSoft in our product, we have 2 new questions.
1- We see you release new builds continuously and we were told that you had fixed an issue with images from text while text.lenght was 0. We would like to have that fix in our engine to have better stability, but we didn't find any procedure of how to install those dlls.
2- We create our reports templates using our exported xml data only. When we then use the template to populate the report with a new xml and send it to printer, it keeps showing the data that was used while making the template. The code i'm using right now is below, what else can i try to have the new data in the report instead of the old ? I write down the xml used for the printing in a file and the xml data is fine, it's the report that doesn't get it.
Thanks for your great support !
Sacha
**************
private static StiReport InitializeReport(MemoryStream xmlData, PrintSessionInfo sessionInfo)
{
StiReport stiReport = new StiReport();
StiOptions.Engine.GlobalEvents.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(OnGetValue);
StiOptions.Engine.HideExceptions = false;
StiOptions.Engine.HideMessages = false;
StiOptions.Engine.LogEnabled = true;
StiOptions.Engine.TraceEnabled = true;
xmlData.Position = 0;
DataSet dataset = new DataSet();
dataset.ReadXml(xmlData);
stiReport.Load(sessionInfo.SummaryReportPath);
stiReport.Dictionary.DataStore.Clear();
stiReport.RegData(dataset);
stiReport.Dictionary.Synchronize();
//Set page orientation if not a custom report
if(!sessionInfo.IsCustomSummaryReport)
{
foreach(StiPage page in stiReport.Pages)
{
page.Orientation = sessionInfo.IsLandscape ? StiPageOrientation.Landscape : StiPageOrientation.Portrait;
}
}
stiReport.PrinterSettings.ShowDialog = false;
stiReport.Compile();
stiReport.CompiledReport.Rendering += new EventHandler(OnRendering);
stiReport.Render(false);
return stiReport;
}
And then call print on the report.
Question on putting xml data into the report built from xml only
For installing the build you should copy all files to Program Files\Stimulsoft\StimulReport.Net\Demo\Bin\.1- We see you release new builds continuously and we were told that you had fixed an issue with images from text while text.lenght was 0. We would like to have that fix in our engine to have better stability, but we didn't find any procedure of how to install those dlls.
After then you have to update files in GAC.
If i right understand you are use Connection to xml data in report for design report template. So you need remove this connection from report. Please use following code:2- We create our reports templates using our exported xml data only. When we then use the template to populate the report with a new xml and send it to printer, it keeps showing the data that was used while making the template. The code i'm using right now is below, what else can i try to have the new data in the report instead of the old ? I write down the xml used for the printing in a file and the xml data is fine, it's the report that doesn't get it.
Code: Select all
stiReport.Dictionary.Databases.Clear();
Question on putting xml data into the report built from xml only
In the previous code, i replaced
stiReport.Dictionary.DataStore.Clear();
by
stiReport.Dictionary.Databases.Clear();
and left the rest as is
now my reports are totally empty
it didnt get what was in my xml
Any other idea ?
stiReport.Dictionary.DataStore.Clear();
by
stiReport.Dictionary.Databases.Clear();
and left the rest as is
now my reports are totally empty

Any other idea ?
Question on putting xml data into the report built from xml only
Please use following code:
Thank you.
Code: Select all
DataSet dataset = new DataSet();
dataset.ReadXml(xmlData);
stiReport.Load(sessionInfo.SummaryReportPath);
stiReport.Dictionary.DataStore.Clear();
stiReport.Dictionary.Databases.Clear();
stiReport.RegData("NameOfMyXmlDatabase", dataset);//Instead "NameOfMyXmlDatabase" you need use name of xml design data in report dictionary
stiReport.Dictionary.Synchronize();
Question on putting xml data into the report built from xml only
Thanks, it fixes the population of the report by our xml 
but now, the bottom of the pages are wrong, like if they didn't had enough space suddenly and print on top of each others and the footer don't appear anymore.
Does the manipulation we just did reseted something that should reinitialize after ?

but now, the bottom of the pages are wrong, like if they didn't had enough space suddenly and print on top of each others and the footer don't appear anymore.
Does the manipulation we just did reseted something that should reinitialize after ?
Question on putting xml data into the report built from xml only
Please send your report to support [at] stimulsoft [dot] com. For also please send us result of export report to pdf file.
Thank you.
Thank you.
Question on putting xml data into the report built from xml only
First way:
1. Please set property LargeHeight of page to true. This property give you additional height in report designer.
2. Place to Page1 DataBand. Set property CountData to 1. To this DataBand move Container8 and Container6. Instead DataBand you can use additional PageHeaderBand .
Second way:
Move all components from PageHeader and PageFooter directly to page.
Third way:
Decrease size of PageFooterBand.
Thank you.
1. Please set property LargeHeight of page to true. This property give you additional height in report designer.
2. Place to Page1 DataBand. Set property CountData to 1. To this DataBand move Container8 and Container6. Instead DataBand you can use additional PageHeaderBand .
Second way:
Move all components from PageHeader and PageFooter directly to page.
Third way:
Decrease size of PageFooterBand.
Thank you.