Expression Report file pathname

Bonjour à tous, je suis nouveau dans la communauté, je travaille en ce moment à la réalisation de programme sous TestStand et LABVIEW.
Je suis actuellement dans la modification du process modèle afin d'y faire apparaître un numéro d'OF qui sera général à une série de carte et qui sera saisie une seule fois avant les n°UUT pour ce faire j'ai construit un vi labview que j'ai inséré au début du process modèle et qui me permet d'enregistrer ce n° dans une variable appelée OFNumber se trouvant dans la StationGlobals et j'ai réussi a le faire apparaître dans le header du report.
Ce que je n'arrive pas à faire est de le faire apparaitre dans le titre de mon report là ou je l'enregistre sur le C:, j'ai essayer pas mal de chose dans le report file pathname du report Options mais sans succès, comment doit-je procéder pour inclure ma variable OFNumber dans le titre de mon report.
Je joint quelques copie d'écran pour illustrer mon propos.
En attendant vos conseils.
Merci
Solved!
Go to Solution.
Attachments:
1.png ‏189 KB
2.png ‏150 KB

Solution trouver, passer OFnumber d'un type number à un type string sinon Stationglobals.ofnumber non supporter dans le report file pathname

Similar Messages

  • Reporting mechanism on HTML report file, using TestStand 2012 SP1

    Hi,
    I am using TestStand 2012 SP1, where the reporting mechanism is configured to be in HTML format.
    I am not getting the full report of the sequence file which is executed, however I get a part of it printed on the HTML file.
    The following are the configured "Report options",
    ===========
    Contents Tab:
    ===========
    Report Format : HTML Document
    Default Numeric Format : %$.13f
    Include Step Result: Checked
                  Result Filtering Expression : Result.Status=="Failed"
                  Include Test Limits : Checked
                  Include Measurements : Checked
                  Include Arrays : Insert Table
                  Filter : Include All
    Include Execution Times : Checked
    On-The-Fly Rporting and Only Display Latest Results : Checked
    Select a Report Generator for producing the Report Body : DLL
    ===========
    Report File Pathname Tab:
    ===========
    Generate Report File Path : Checked
           File Name/Directory Options : Specify Report File Path by Expression
           Report File Path (Sequential Model) :
                            StationGlobals.TopLevelReportPath
                            +RunState.ProcessModelClient.AsPropertyObjectFile.​DisplayName+"Report_[<FileDate>]<Unique>.<FileExte​nsion>"
    Please let me know a solution to this problem.
    Thanks,
    Dharani

    Jason,
    Thankyou for replying.
    Yes, I need only the steps which had failed to print on the report file.
    The problem what I am facing is, if there are 10 failed steps, the report is not printed for all.
    Also the order of printing is not correct for the first step and the last step which is printed on the report file.
    I had used "Post Expression" for printing data for all the failed steps. Normally these post expressions should be printed beneath the step in the report file.
    However,
    1) For the first step which is printed on the html file, the post expression gets printed just above the step and also it gets printed beneath the step.
    2) For the last step which is printed on the html file, the post expression is not printed beneath the step.
    Please let me know if i need to provide some more information.
    Thanks,
    Dharani

  • Adding batch serial number to report file name in sequential model

    Hi,
    I'm using a Sequential model in TS 4.0 and have learned how to add the UUT serial number to the report file name. But I would like to add the batch serial number instead. Is this possible? Any modifications to the ReportOptions callback seem to only modify the temp report name.
    Thanks!
    Chris

    Hi Chris,
    While Paul's suggestion may be useful in this case, if you would like the flexibility of customizing your Report File Pathnames further, you may want to consider upgrading to TestStand 4.2.
    In TestStand 4.2 we introduced predefined macros and the ability to use custom expressions to specify the Report File Pathname. For example, the <Batch> macro will add the Batch Serial Number to the Report File Pathname as you specify it.
    Please see the Using Expressions to Customize Report File Paths section of the TestStand 4.2 Reference Manual for more information on these new reporting features and how one might use them. For a specific explanation of the different macros and what they might be used for, please see the Specifying Report File Paths by Expression section of the TestStand 4.2 Online Help.
    Manooch H.
    National Instruments

  • Specify Report File Path by Expression

    TS201x Help under "Specifying Report File Paths by Expression" talks about  using a number of various macros, but starts the page showing how to also use FileGlobals. When specifying the expression (... >>Specify Report File Path by Expression>>Expression Browser), I'd like to combine macros with FileGlobals, but none of the FileGlobals are listed i.e. available. The expression builder has access to the StationGlobals though, but not to the FileGlobals.
    Is there a workaround, or at least an explanation, for this behaviour?
    Cheers
    Solved!
    Go to Solution.
    Attachments:
    Specifying Report File Paths by Expression.pdf ‏247 KB

    Thank for your quick reply!
    So, I created the expression in the >>Specify Report File Path by Expression>>Expression Browser, using FileGlobals.MyReportName as per your suggestion.
    Here, as expected, I got the first two error messages shown in the attached pdf.
    I also made sure that my sequence has the FileGlobals.MyReportName defined.
    When I run my sequence, I get the third error message shown in the attached pdf. I'd say this error message is also expected, since the non-listed FileGlobal
    referred to in my expression created above, never reaches NI_ReportGenerator.seq i.e. modelsupport2.dll. Or perhaps I completely missed a point in your message?
    In any case, please reply if you get a chance.
    Cheers
    Attachments:
    Specifying Report File Paths by Expression - Error Messages.pdf ‏113 KB

  • Connect to SQL Server 2005 Express MDF file

    Post Author: ims_user
    CA Forum: Data Connectivity and SQL
    Is it possible to connect directly to a SQL Server 2005 Express MDF file? Every time I select SQL Native Client it expects me to put in a server name etc, but there is no where to put in a file name or connection string. My application connects to this file directly using this in the connection string
    Data Source=.\SQLEXPRESS;AttachDbFilename=
    I now need to report on the data it contains.
    Many thanks.

    Post Author: ims_user
    CA Forum: Data Connectivity and SQL
    Is it possible to connect directly to a SQL Server 2005 Express MDF file? Every time I select SQL Native Client it expects me to put in a server name etc, but there is no where to put in a file name or connection string. My application connects to this file directly using this in the connection string
    Data Source=.\SQLEXPRESS;AttachDbFilename=
    I now need to report on the data it contains.
    Many thanks.

  • TestStand 2012 Report File Location variable

    Hi,
    In TestStand 2010 SP1, I have the "report file path" as one of the column into the database using the RunState.Report.Location.  This has been working until I upgraded to TestStand 2012.  The RunState.Report.Location is always empty.  I also tried to use the RunState.Root.Locals.ReportFilePath but I get an error that this is an unknow variable when logging to the database.  Even when removing the <UUTStatus> from the file path expression below, there is no difference.  
    I am using the following report file path expression:
    "C:\\TSReports\\<UUTStatus>\\<ClientFileName>_Report[<FileDate>][<FileTime>][UUT]_<UUTStatus>.<FileExtension>"
    Which variable contains the report file path in TestStand 2012.  
    Solved!
    Go to Solution.

    I haven't tried it, but RunState.Report.Location might work if you set the New Thread option on the Report and Database to False (assuming the report is first in the list) so you can be sure that the Report has been generated before you check that value.
    You have to set the Configure>>Result Processing>>Show More Options to see the New Thread options.
    This should give you access to the path of the Displayed report (the one with the checkmark in the Display column). However, in TS 2012, you can have any number of reports.
    There is a new callback, GetReportFilePath, you can add to your sequences to obtain the report paths as they are determined. You could store the paths in a station global or runtime variable for later use if needed.

  • Conditional report file path

    Our project is using TestStand 2012 SP1.
    We are using reportgen_txt.seq. and SequentialModel(.seq).
    My goal is to save report files to a specific directory only when I run my Self_Test.seq.
    I'm attempting to use Configure >> Report Options >> Generate Report File Path.
    Setting in "Report Options" dialog >> "Generate Report File Path" tab:
    Type Model: Sequential
    File Name/Directory Options: Specify Report File Path by Expression
    This is the expression that I'm using:
    "<ClientFileName>" == "Self_Test" ? "C:\\Reports\\Self-test\\<ClientFileName>_Report[<UUT>][<FileTime>][<FileDate>]<Unique>.<FileExtension>" : "C:\\Reports\\<UUT>\\<ClientFileName>_Report[<UUT>][<FileTime>][<FileDate>]<Unique>.<FileExtension>"
    The statment passes syntax check with "no errors".
    Running Self_Test.seq using the sequence editor, the report file always goes to path in Red. 
    Is there a method to accomplish this? 
    Solved!
    Go to Solution.

    Hi Leroy/jigg,
    You are correct that the expression itself is evaluated before the Macro strings are resolved, so this approach won't work.  The macros are evaluated using modelsupport2.dll (DetermineReportFilePathNameExprEx function), which first evaluates the expression before resolving the macros. For implementing a custom report file path expression for a particular client file, I would recommend overriding the ReportOptions callback, then programatically setting the report path expression, using an expression such as:
    Parameters.ReportOptions.ReportFileSequentialModelExpression = "\"MyCustomLocation\\<ClientFileName>_Report[<FileTime>][<FileDate>].<FileExtension>\""
    Note the use of double quotes since the field is an expression field.  This approach will also allow you to use logic in the callback to change the report file path string using TestStand flow control steps.
    Al B.
    Staff Software Engineer - TestStand
    CTA/CLD

  • Generate package report file

    Hi All,
    I want to generate only package report same as inDesign's package report(File->package->report).
    I have tried below code snippet,
    InterfacePtr<IS4SPPackage> iPakager((IS4SPPackage*)::CreateObject(kPackageAPIBoss, IID_IS4SPPACKAGEAPI));
    if(!iPakager)
        break;
    IDocument* document = Utils<ILayoutUIUtils>()->GetFrontDocument();
    if(!document)
       break;
    iPakager->Init(document);
    iPakager->SetPackageLocation(pacakeFilePath);
    iPakager->SetViewReportFlag(kFalse);
    iPakager->SetCopyFontsFlag(kTrue);
    InterfacePtr<IPackageReport> iPakage((IPackageReport*)::CreateObject(kS4SPPackageReportBoss, IID_IS4SPPACKAGEREPORT));
    if(iPakage)
      iPakage->GenerateReport(iPakager);
    Report file is generated(missing most of the information) but,generated report file and indesign's report file both are different.
    Any idea what I am doing wrong?
    Thanks in advance.
    Tahir.

    Hi Alex,
    When I try to create the procedure event_driven_report mentioned in Doc ID 199743.1. I am getting below errors. Thoughts? Am I missing some thing?
    2/14 PL/SQL: Item ignored
    2/14 PLS-00201: identifier 'SRW_PARAMLIST' must be declared
    3/14 PL/SQL: Item ignored
    3/14 PLS-00201: identifier 'SRW.JOB_IDENT' must be declared
    5/5 PL/SQL: Statement ignored
    5/5 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    6/5 PL/SQL: Statement ignored
    6/23 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    7/5 PL/SQL: Statement ignored
    7/23 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    8/5 PL/SQL: Statement ignored
    8/23 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    9/5 PL/SQL: Statement ignored
    9/23 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    10/5 PL/SQL: Statement ignored
    10/23 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    11/5 PL/SQL: Statement ignored
    11/23 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    12/5 PL/SQL: Statement ignored
    12/23 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    Thanks
    Vishnu Nekkanti

  • Crystal report file locked

    Hello,
    I have an application in Visual Basic 6.0 an use Crystal Reports 8.5 through OCX.  Whenever I open a report and close it again, the report file is locked on the computer.  I have to shut down my VB6 program in order to be able to delete or overwrite it on my PC.  I think I do not close my report properly, so it stays in memory as long as my VB6 application runs.
    My code runs as follows:
       Load frmBeginEnEinddatumIngeven
       frmBeginEnEinddatumIngeven.Show vbModal
       If Not frmBeginEnEinddatumIngeven.blnAnnulerenGekozen Then
          With crptBRUMUKassasysteem
             .Formulas(0) = "Begindatum = '" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "dddd dd mmmm yyyy") & "'"
             .Formulas(1) = "Einddatum = '" & Format(frmBeginEnEinddatumIngeven.dtEinddatum, "dddd dd mmmm yyyy") & "'"
             .SelectionFormula = ""
                   .ReportFileName = gsRapportenpad & "Ticket\rptTicketPeriodeVerkoop.rpt"
                   .SelectionFormula = "{tblA_Musea.MU_Museum_id} = " & glVerkooplocatie_id & " And {tblTV_Sessies.TVSE_Begintijd} >= #" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "mm/dd/yyyy") & "# And {tblTV_Sessies.TVSE_Begintijd} < #" & Format(frmBeginEnEinddatumIngeven.dtEinddatum + 1, "mm/dd/yyyy") & "#"
                   .Action = 1
                   .ReportFileName = gsRapportenpad & "Ticket\rptTicketPeriodeBezoekersstatistiek.rpt"
                   .SelectionFormula = "{tblA_Musea.MU_Museum_id} = " & glVerkooplocatie_id & " And {tblTV_Sessies.TVSE_Begintijd} >= #" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "mm/dd/yyyy") & "# And {tblTV_Sessies.TVSE_Begintijd} < #" & Format(frmBeginEnEinddatumIngeven.dtEinddatum + 1, "mm/dd/yyyy") & "#"
                   .Action = 1
                     .Formulas(0) = ""
             .Formulas(1) = ""
             .SelectionFormula = ""
          End With
       End If
    Can anyone help me to solve this problem?
    Many thanks and greetings,
    Michel

    Hi,
    Did you try running one report first if still the problem persist? Or try running other report with one condition only, Let say try to run this first,
    If Not frmBeginEnEinddatumIngeven.blnAnnulerenGekozen Then
    With crptBRUMUKassasysteem
    .Formulas(0) = "Begindatum = '" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "dddd dd mmmm yyyy") & "'"
    .Formulas(1) = "Einddatum = '" & Format(frmBeginEnEinddatumIngeven.dtEinddatum, "dddd dd mmmm yyyy") & "'"
    .SelectionFormula = ""
    .ReportFileName = gsRapportenpad & "Ticket\rptTicketPeriodeVerkoop.rpt"
    .SelectionFormula = "{tblA_Musea.MU_Museum_id} = " & glVerkooplocatie_id & " And {tblTV_Sessies.TVSE_Begintijd} >= #" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "mm/dd/yyyy") & "# And {tblTV_Sessies.TVSE_Begintijd} < #" & Format(frmBeginEnEinddatumIngeven.dtEinddatum + 1, "mm/dd/yyyy") & "#"
    .Action = 1
    Regards,
    Clint

  • Can no longer open up report file - Crystal Crashes

    I have a crystal report that I can not longer get to open. I'm on windows 7 32-bit, and I've attempted to open it in both 2008 and 2011.
    The report is comprised mainly of sub-reports. Each sub-report in its own report header section. I'm pretty sure the issue is related to a fairly large sub-report that I added that contains pretty sizable images. The image sub-report is around 24MB and the entire report is around 25MB.
    Everything was fine up until I added the image sub-report. Now I cannot even get the crystal file to open.
    2008 version: 12.4.0.966
    2011 (trial) version: 14.0.2.364RTM
    I was finally able to open the report after trying many times and so I deleted the image sub-report and tried to save it again but it crashed...
    [Report File|http://www.mediafire.com/?yc0vvr2rvd880ef]
    Edited by: philyq on Dec 28, 2011 8:03 PM

    Adding to DEP did not resolve the issue... I can still manage to open it once in a while... I don't know how I exactly get it to open though... I've been switching the default program from 2008 and 2011 and tried opening it multiple times, or the second it crashes I attempt again, and sometimes doing any of these gets it to open but I can never re-save it again. Something in the report is causing it to crash. I think it may now be the "Consents" sub-report.

  • In the ReportDocument.Load method it tries to connect using the using the connection information embedded in the Report File

    Post Author: bhaveshbusa
    CA Forum: Crystal Reports
    In the ReportDocument.Load method it tries to connect using the using the connection information embedded in the Report File. When the application calls ReportDocument.Load(reportFileName). This
    tries to connect to the database using the connection information embedded in
    the "reportFileName". This was only realised on checking the ODBC Trace
    Log. The connection itself is not a problem. The problem is that the embedded
    connection information is related to OLD production system. And failed
    connections had raised some concerns.
    Note: I am using
    SetDataSource to populate the data for the report. So I don't need the
    connection.
    Is there any way I
    can disable this auto-connect?
    Thanks and
    regards,
    Bhavesh

    960738 wrote:
    I need a help in answering one of the issue encountered last week.
    I have created a database link and tried to access the information from a table using the program written in another language. The password provided was incorrect for that user while creating database link. So we expected that,while retrieving the data, Database connection has to be errored out as password provided is incorrrect.
    But unfortunately, user account was locked out. When i checked with DBAs they mentioned that it tries to connect 16 ports with in a min of time.we were shocked as it STOPS another scheduled jobs with that user. and affects production badly.
    As per the program, it has to connect only one time and yesterday we tried to execute the program in DBAs observation and it errored out as expected. Didn't tried for multiple ports.
    Now the question is, WHY the database connection established 16 times last week and caused user account locked. DBAs are unable to answer it. Any EXPERTs opinion on this would greatly appreciated.
    I have verified managing ports in oracle documentation, it was mentioned that if one port is busy it will try to connect to another port in the range of ports mentioned during the installtion. DBAs verified ports related file and it was blank. and they are not agreeing with this reason. Please HELP me in finding the correct REASON for this.
    is it a NETWORK issue or issue with DATABASE SERVER only?
    Thanks
    SSP
    Edited by: 960738 on Sep 22, 2012 9:13 PMDBLINK is 100% oblivious to the fact any port exists.
    DBLINK only contains username, password & TNS Alias.
    can you post actual SQL & results?

  • Access Denied to report file on Windows Server 2003 Enterprise

    Hi,
    I have a deployment problem for which I am out of ideas. I have an ASP.NET web site deployed on a server running Windows Server 2003 R2, sp2.  It makes extensive use of Crystal Reports, including both displaying them and e-mailing them to specified recipients as PDF files. It all works great.
    Now I need to port the web site to a different server, running Windows Server 2003 Enterprise, sp1. The reports display fine as long as I am not trying to convert it to PDF for e-mailng. When it gets to the following line in my code:
    MemoryStream memStream = (MemoryStream)rptDoc.ExportToStream(ExportFormatType.PortableDocFormat);
    It reports the following error:
    Access denied.Error in File JobDetails {DC64A5D3-9DD7-4E4C-90F5-A08731409B29}.rpt:
    Access to report file denied. Another program may be using it.
    I finally got it to work by granting Modify permission to Everyone for the c:\Windows\Temp folder. Obviously this is not a good practice.  Granting Full Control  to the IUSR_servername account did not solve the problem on Windows Server Enterprise, although it did the trick on R2.
    So the question is, which account needs which permission to the Temp folder to enable the PDF to get written?
    Thanks.
    Dan

    What ever account the app is running under will need read / write permissions on the temp folder. Your working server should be a good place to look to see how the premissions were set there. The same will apply to any other server(?).
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to call cystal report8 report file from jsp page

    hi guys
    present i am using cystal report8 already i am having ReportViewer.jar and ReportviewerBean.jar files
    using that please send me sample code how to call that report from jsp page..
    and how to pass the parameters from jsp page to crystalreport8 report file.
    it was very urgent task to me..so please send sample code on above topic..
    or send me crystalreport8 API
    thanks
    regards

    Hi,
    I also want to work on crystal report but i dont have the ReportViewerBean.jar and ReportViewer.jar. So, please tell from where will i get those jar files.
    Thanks in advanced.

  • Help required in embedding flash file object into Crystal Report file.

    Hello,
          I use the default version of Crystal Report (i.e.'Crystal Report Basic For Visual Studio 2008 - version 10.5' ) which is the part of 'Visual Studio 2008', to create and display the Report. Further, as a requirement, I have to show 'Event Video' into the Report. But, as this default version of Crystal Report does not support Flash File, I uninstalled it and downloaded and installed the 30 days trial version of the Crystal Report (i.e. Crystal Report 2008 - version 12.0).
          Then, I created a new Crystal Report File using 'Crystal Report 2008 Designer', embedded the video as a Flash File(i.e. SWF file) into it. Now,  when I add this newly created Crystal Report File into my sample application, which is created using VS 2008, it does not shows the embedded video.
          So, can anybody please tell me, how can I embed the Flash File into Crystal Report, so that it will be visible in the sample application?
    I would like to appreciate your help and support.
    Thanks,
    -Yogesh.

    Symptom :
    When embedding a pdf document into a Crystal Report, only the one page shows.
    Reproducing the Issue
    Environment:
    Crystal Reports OLE object
    Cause
    An OLE object only displays the first page.
    Resolution
    Embed multiple objects, one for each page
    Or
    Use a hyperlink to the object instead
    Hope this helps!
    Regards,
    Vinay

  • RE: What's database field are used in crystal report file?

    Hi all
    Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail section of report.....)
    We looking forward to hearing from you
    Thanks
    Son

    Hello Son,
    please use this code below to get a list of used database fields in a report :
    //File Name:          CS_Get_report_data_out_inproc.sln
    //Created:            April 11, 2008
    //Author ID:          FLI
    //Purpose:            This C# .NET sample Windows application demonstrates
    //                  how to retrieve report data and put the into a XML file
    //                  using unmanaged RAS.
    // Note this is available without a dedicated RAS with SP2 for XI R2
    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    namespace CS_Get_report_data_out_inproc
        public partial class Form1 : Form
            // CR Declarations
            ReportDocument boReportDocument;
            ISCDReportClientDocument boReportClientDocument;
            public Form1()
                InitializeComponent();
                //Create a new ReportDocument
                boReportDocument = new ReportDocument();
                // load the RPT file
                boReportDocument.Load("..
    ReportData.rpt");
                // show in reportviewer
                crystalReportViewer1.ReportSource = boReportDocument;
            private void button1_Click(object sender, EventArgs e)
                //Access the ReportClientDocument in the ReportDocument (EROM bridge)
                boReportClientDocument = boReportDocument.ReportClientDocument;
                // Retrieve the Rowset Controller
                RowsetController boRowsetController = boReportClientDocument.RowsetController;
                // Retrieve the metadata (column headers) - this allows you to only retrieve the data that is on the report.
                RowsetMetaData boRowsetMetaData = new RowsetMetaData();
                Fields boFields = boReportClientDocument.DataDefinition.ResultFields;
                boRowsetMetaData.DataFields = boFields;
                // Now print out the data in XML file
                //(Note: This will print out the results of formulas too)
                StreamWriter sw = new StreamWriter("C:
    ReportData.xml", false);
                sw.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
                sw.WriteLine("<ReportData>");
                sw.WriteLine("<Reportheader>");
                // Print out the titles
                for (int i = 0; i < boFields.Count; i++)
                    String boFieldName = boFields<i>.Name;
                    sw.WriteLine("<ReportheaderDetail>" + boFieldName + "</ReportheaderDetail>");
                sw.WriteLine("</Reportheader>");
                //Create the cursor which lets us loop through the data
                RowsetCursor boRowsetCursor = boRowsetController.CreateCursor(null, boRowsetMetaData, 1);
                Record boRecord;
                while (boRowsetCursor.IsEOF == false)
                    sw.WriteLine("<Customer>");
                    boRecord = boRowsetCursor.CurrentRecord;
                    for (int j = 0; j < boFields.Count; j++)
                        try
                            sw.WriteLine("<Detail>" + (String)boRecord[j].ToString() + "</Detail>");
                        catch (Exception err)
                            sw.WriteLine("<Error>" + err.Message + "</Error>");
                    sw.WriteLine("</Customer>");
                    boRowsetCursor.MoveNext();
                sw.WriteLine("</ReportData>");
                // CLose the file
                sw.Close();
                MessageBox.Show("XML File 'ReportData.xml' successfully created on C:");

Maybe you are looking for