Passing Data to reports have Multi data set
Passing Data to reports have Multi data set
Hi,
I've designed a report with twof(or multi) data set. How do I gen the XML content like below at runtime and then use the StiReport.regData() to pass the XML to the report?
ex:
<Categories>
<CategoryID>1</CategoryID>
<CategoryName>Beverages</CategoryName>
<Description>Soft drinks, coffees, teas, beers, and ales</Description>
</Categories>
<Categories>
<CategoryID>2</CategoryID>
<CategoryName>Condiments</CategoryName>
<Description>Sweet and savory sauces, relishes, spreads, and seasonings</Description>
</Categories>
<Products>
<ProductID>1</ProductID>
<ProductName>Chai</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
<UnitPrice>18</UnitPrice>
<UnitsInStock>39</UnitsInStock>
</Products>
<Products>
<ProductID>2</ProductID>
<ProductName>Chang</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>24 - 12 oz bottles</QuantityPerUnit>
<UnitPrice>19</UnitPrice>
<UnitsInStock>17</UnitsInStock>
</Products>
Thanks in advance
Kuocs 2014.3.20
I've designed a report with twof(or multi) data set. How do I gen the XML content like below at runtime and then use the StiReport.regData() to pass the XML to the report?
ex:
<Categories>
<CategoryID>1</CategoryID>
<CategoryName>Beverages</CategoryName>
<Description>Soft drinks, coffees, teas, beers, and ales</Description>
</Categories>
<Categories>
<CategoryID>2</CategoryID>
<CategoryName>Condiments</CategoryName>
<Description>Sweet and savory sauces, relishes, spreads, and seasonings</Description>
</Categories>
<Products>
<ProductID>1</ProductID>
<ProductName>Chai</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
<UnitPrice>18</UnitPrice>
<UnitsInStock>39</UnitsInStock>
</Products>
<Products>
<ProductID>2</ProductID>
<ProductName>Chang</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>24 - 12 oz bottles</QuantityPerUnit>
<UnitPrice>19</UnitPrice>
<UnitsInStock>17</UnitsInStock>
</Products>
Thanks in advance
Kuocs 2014.3.20
Re: Passing Data to reports have Multi data set
Hello.
Could you specify what product and version do you use?
What is "Kuocs 2014.3.20"?
Thank you.
Could you specify what product and version do you use?
What is "Kuocs 2014.3.20"?
Thank you.
Re: Passing Data to reports have Multi data set
Hello,
product and version is Stimulsoft Reports.Fx for Flex 2013.3
Kuocs is my name.
tks
product and version is Stimulsoft Reports.Fx for Flex 2013.3
Kuocs is my name.
tks
Re: Passing Data to reports have Multi data set
Hello Kuocs,
You can use one of the methods described on the link below:
http://support.stimulsoft.com/index.php ... x-for-flex
As well in your data you need to add the root key:
Thank you.
You can use one of the methods described on the link below:
http://support.stimulsoft.com/index.php ... x-for-flex
As well in your data you need to add the root key:
Code: Select all
<Data>
<Categories>
<CategoryID>1</CategoryID>
<CategoryName>Beverages</CategoryName>
<Description>Soft drinks, coffees, teas, beers, and ales</Description>
</Categories>
<Categories>
<CategoryID>2</CategoryID>
<CategoryName>Condiments</CategoryName>
<Description>Sweet and savory sauces, relishes, spreads, and seasonings</Description>
</Categories>
<Products>
<ProductID>1</ProductID>
<ProductName>Chai</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
<UnitPrice>18</UnitPrice>
<UnitsInStock>39</UnitsInStock>
</Products>
<Products>
<ProductID>2</ProductID>
<ProductName>Chang</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>24 - 12 oz bottles</QuantityPerUnit>
<UnitPrice>19</UnitPrice>
<UnitsInStock>17</UnitsInStock>
</Products>
</Data>
Re: Passing Data to reports have Multi data set
Dear Vladimir,
Thanks for your help.
I have had implemented report using "DataTable and DataSet structures" already,
but I don't know how to gen XML structures by some methods?
SimpleXMLEncoder.encodeValue can't gen the correct XML structures for Multi tables.
I have Categories and Products ResultEvent,how do I use to convert(assemble) XML structures like below .
<root>
<Categories>
<CategoryID>1</CategoryID>
<CategoryName>Beverages</CategoryName>
<Description>Soft drinks, coffees, teas, beers, and ales</Description>
</Categories>
<Categories>
<CategoryID>2</CategoryID>
<CategoryName>Condiments</CategoryName>
<Description>Sweet and savory sauces, relishes, spreads, and seasonings</Description>
</Categories>
<Products>
<ProductID>1</ProductID>
<ProductName>Chai</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
<UnitPrice>18</UnitPrice>
<UnitsInStock>39</UnitsInStock>
</Products>
<Products>
<ProductID>2</ProductID>
<ProductName>Chang</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>24 - 12 oz bottles</QuantityPerUnit>
<UnitPrice>19</UnitPrice>
<UnitsInStock>17</UnitsInStock>
</Products>
</root>
Thanks for your help again.
Kuocs 2014/3/21
Thanks for your help.
I have had implemented report using "DataTable and DataSet structures" already,
but I don't know how to gen XML structures by some methods?
SimpleXMLEncoder.encodeValue can't gen the correct XML structures for Multi tables.
I have Categories and Products ResultEvent,how do I use to convert(assemble) XML structures like below .
<root>
<Categories>
<CategoryID>1</CategoryID>
<CategoryName>Beverages</CategoryName>
<Description>Soft drinks, coffees, teas, beers, and ales</Description>
</Categories>
<Categories>
<CategoryID>2</CategoryID>
<CategoryName>Condiments</CategoryName>
<Description>Sweet and savory sauces, relishes, spreads, and seasonings</Description>
</Categories>
<Products>
<ProductID>1</ProductID>
<ProductName>Chai</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
<UnitPrice>18</UnitPrice>
<UnitsInStock>39</UnitsInStock>
</Products>
<Products>
<ProductID>2</ProductID>
<ProductName>Chang</ProductName>
<SupplierID>1</SupplierID>
<CategoryID>1</CategoryID>
<QuantityPerUnit>24 - 12 oz bottles</QuantityPerUnit>
<UnitPrice>19</UnitPrice>
<UnitsInStock>17</UnitsInStock>
</Products>
</root>
Thanks for your help again.
Kuocs 2014/3/21
Re: Passing Data to reports have Multi data set
Hello,
Please clarify, do you want to save the filled DataSet structure to XML data string?
Thank you.
Please clarify, do you want to save the filled DataSet structure to XML data string?
Thank you.
Re: Passing Data to reports have Multi data set
Hello,
Sorry, we probably misunderstanding the problem. Please explain the problem in more detail, if possible, send us a sample application with the comments - in which place you want to connect the XML data structure and how you load it.
For registration data in the report, you can simply call the method:
report.regData(...);
Thank you.
Sorry, we probably misunderstanding the problem. Please explain the problem in more detail, if possible, send us a sample application with the comments - in which place you want to connect the XML data structure and how you load it.
For registration data in the report, you can simply call the method:
report.regData(...);
Thank you.