Creating DemoNet.data file

Stimulsoft Reports.Silverlight discussion
Post Reply
DavidWatt
Posts: 13
Joined: Mon Jan 16, 2017 4:28 pm

Creating DemoNet.data file

Post by DavidWatt » Wed Jan 25, 2017 3:13 pm

I am evaluating Stimulsoft, and would like to be capable of producing data just like the Demo dataset in DemoNet.data. Can you provide me with example code that you used to create and then write this file. Is there a DLL that has I can use for this process?

Note: When I export data straight from a DataSet (using WriteXml() and WriteXmlSchema()) it does not provide the XML structures (StiDataSet, Reduction, TablesInfo, Contents, RelationsInfo, TablesChildRelations> I am seeing in DemoNet.data.

Example:
<StiDataSet name="Demo" version="1.0">
<Reduction>
<Categories>i0</Categories>
<CategoryID>i1</CategoryID>
...
</Reduction>
<TablesInfo>
<i0>
<i1>System.Int32</i1>
<i2>System.String</i2>
<i3>System.String</i3>
<i4>System.Byte[]</i4>
</i0>
...
</TablesInfo>
<Contents>
<i0>
<i1>1</i1>
<i2>Beverages</i2>
<i3>Soft drinks, coffees, teas, beers, and ales</i3>
...
</i0>
...
</Contents>
<RelationsInfo>
<Relation>
<RelationName>i5</RelationName>
<ParentTable>i0</ParentTable>
<ChildTable>i54</ChildTable>
<ParentColumns>
<i1 />
</ParentColumns>
<ChildColumns>
<i1 />
</ChildColumns>
</Relation>
...
</RelationsInfo>
<TablesChildRelations>
<i0>
<i5 />
</i0>
...
</TablesChildRelations>
</StiDataSet>
HighAley
Posts: 8065
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Creating DemoNet.data file

Post by HighAley » Thu Jan 26, 2017 11:59 am

Demo.xml
(1.79 MiB) Downloaded 92 times
Hello.

Sorry, maybe we missed something.
Where did you get this file?
Our Demo data looks different.

Thank you.
Attachments
Demo.xsd
(12.72 KiB) Downloaded 81 times
DavidWatt
Posts: 13
Joined: Mon Jan 16, 2017 4:28 pm

Re: Creating DemoNet.data file

Post by DavidWatt » Thu Jan 26, 2017 2:48 pm

When I downloaded Samples-Silverlight-CSharp-master.zip, in the "Using DataSet as Business Object" There is a DemoNet.data file that was being read and loaded into a DataSet.

DataSet dataSet = new DataSet();
using (var stream = asm.GetManifestResourceStream("UsingDataSetAsBusinessObject.DemoNet.data"))
{
dataSet.Load(stream);
}

I am using the Silverlight Control in Xaml (*** In Silverlight See code below ***), and can not get the XML (Attachments you provided) report data loaded and bound properly for the Design (and Preview with data). How can I do this using the Silverlight control, and in the Xaml code-behind? Note: DataSets do not work the same in Silverlight; the ReadXML, WriteXML, ReadXMLSchema, and WriteXMLSchema methods are not available.

Can you point me to a working example using the XSD and XML in Silverlight?

XAML:

<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006 ... esentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/marku ... ility/2006"
xmlns:SLDesign="clr-namespace:Stimulsoft.Report.SLDesign;assembly=Stimulsoft.Report.SLDesign" x:Class="Demo_XML.MainPage"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400"
Loaded="UserControl_Loaded">

<Grid x:Name="LayoutRoot" Background="White">

<SLDesign:StiSLDesignerControl Grid.Row="1" x:Name="StiWebDesignerSL1" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Top" />

</Grid>
</UserControl>


Code-Behind:

private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
StiReport report = new StiReport();
var asm = Assembly.GetExecutingAssembly();

// From supplied data file
DataSet dataSet = new DataSet();

Stream stream = asm.GetManifestResourceStream("Demo_XML.DemoNet.data");
dataSet.Load(stream);

report.RegBusinessObject("XMLDemo", dataSet);

report.Dictionary.SynchronizeBusinessObjects(3);

report.Design();
}
HighAley
Posts: 8065
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Creating DemoNet.data file

Post by HighAley » Fri Jan 27, 2017 1:53 pm

Hello.

As I understand you need a way to create such XML file because the other files are not supported.
Please, send us a request to support@stimulsoft.com and we will try to help you.

Thank you.
DavidWatt
Posts: 13
Joined: Mon Jan 16, 2017 4:28 pm

Re: Creating DemoNet.data file

Post by DavidWatt » Fri Jan 27, 2017 2:13 pm

That has changed given your answer. I want a way to registerBusinessObject using Demo.xsd / Demo.xml in Silverlight Code-Behind. I cannot get this to work because of the limitations of the DataSet in Silverlight.

I can get it to work using the alternate format used in the DemoNet.data file, but building this file is much more challanging. Since you indicated this is not the accepted format, I would like to use the "normal" format created by "WriteXml and WriteXmlSchema.

Should I still communicate with your support group?
DavidWatt
Posts: 13
Joined: Mon Jan 16, 2017 4:28 pm

Re: Creating DemoNet.data file

Post by DavidWatt » Fri Jan 27, 2017 2:26 pm

I did send a request to support@stimulsoft.com. To help me load the designer with Data.xsd / Data.xml.

Thanks tor replying.
Alex K.
Posts: 6489
Joined: Thu Jul 29, 2010 2:37 am

Re: Creating DemoNet.data file

Post by Alex K. » Mon Jan 30, 2017 7:19 am

Hello,

Ok.
We will reply to you by email on the support system.

Thank you.
Post Reply