Some times we need to view, print or export filtered data
In this article, I will show how one can do this with the simplest manner. In the current sample we assume that we will use a crystal report model located in the C:\ directory with "C:\myCrReport.rpt" as File Name. This last one consumes data from an xml file called "C:\Resources.xml". And here is the given xml file content, just copy and paste it in a bloc note and save the contents as Ressources.xml in the "C:\" directory, of Course, in case when the code sample mentioned after would be tested
<?xml version="1.0" standalone="yes"?>
<Table>
<Stock>
<CodeStockPK>STO0000</CodeStockPK>
<Operation>Achat</Operation>
<Date>2007-11-26T22:07:13.5+01:00</Date>
<CodeLivreurFK>LIV0000</CodeLivreurFK>
<CodeReglementFK>REG0000</CodeReglementFK>
<Secteur>Bizerte</Secteur>
</Stock>
<Stock>
<CodeStockPK>STO0001</CodeStockPK>
<Operation>Achat</Operation>
<Date>2007-11-12T22:08:02+01:00</Date>
<CodeLivreurFK>LIV0000</CodeLivreurFK>
<CodeReglementFK>REG0001</CodeReglementFK>
<Secteur>Bizerte</Secteur>
</Stock>
<Stock>
<CodeStockPK>STO0002</CodeStockPK>
<Operation>Achat</Operation>
<Date>2007-11-26T22:08:30.5+01:00</Date>
<CodeLivreurFK>LIV0001</CodeLivreurFK>
<CodeReglementFK>REG0000</CodeReglementFK>
<Secteur>Sahel</Secteur>
</Stock>
<Stock>
<CodeStockPK>STO0003</CodeStockPK>
<Operation>Achat</Operation>
<Date>2007-11-29T17:48:42.921875+01:00</Date>
<CodeLivreurFK>LIV0000</CodeLivreurFK>
<CodeReglementFK>REG0000</CodeReglementFK>
<Secteur>Bizerte</Secteur>
</Stock>
<Stock>
<CodeStockPK>STO0004</CodeStockPK>
<Operation>Achat</Operation>
<Date>2007-11-29T17:49:16.265625+01:00</Date>
<CodeLivreurFK>LIV0000</CodeLivreurFK>
<CodeReglementFK>REG0000</CodeReglementFK>
<Secteur>Sfax</Secteur>
</Stock>
<Stock>
<CodeStockPK>STO0005</CodeStockPK>
<Operation>Vente</Operation>
<Date>2007-11-29T17:49:34.046875+01:00</Date>
<CodeLivreurFK>LIV0000</CodeLivreurFK>
<CodeReglementFK>REG0000</CodeReglementFK>
<Secteur>Bizerte</Secteur>
</Stock>
<Stock>
<CodeStockPK>STO0006</CodeStockPK>
<Operation>Vente</Operation>
<Date>2007-11-29T17:49:42.3125+01:00</Date>
<CodeLivreurFK>LIV0000</CodeLivreurFK>
<CodeReglementFK>REG0000</CodeReglementFK>
<Secteur>Sfax</Secteur>
</Stock>
<Stock>
<CodeStockPK>STO0007</CodeStockPK>
<Operation>Vente</Operation>
<Date>2007-11-29T17:49:52.09375+01:00</Date>
<CodeLivreurFK>LIV0000</CodeLivreurFK>
<CodeReglementFK>REG0000</CodeReglementFK>
<Secteur>Sfax</Secteur>
</Stock>
</Table>
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.







laxman sPosted Mar 12, 2008, 10:59 AM
I have Created a Stored procedure with For Xml AUTO,TYPE And retrieving data toa temp XMl file. and binding datasource to the report.Instead of creating this temp xml file .How can we bind this runtime generated xml file to the Report Dynamically
laxman sPosted Mar 12, 2008, 10:58 AM
I have Created a Stored procedure with For Xml AUTO,TYPE And retrieving data toa temp XMl file. and binding datasource to the report.Instead of creating this temp xml file .How can we bind this runtime generated xml file to the Report Dynamically