Setting selection formula in subreport

Hi all,
I hope there is a simple solution to this.
I have a standard report, works great and now I need to add a subreport to the footer.  The new subreport is not linked to anything in the main report and shouldn't be.  I am using CrystalReportSource to pass parameters to the main report and the subreport and I set the selectionformula for the main report with this code and it works great:
        me.CrystalReportViewer1.SelectionFormula = mySelectionString
I still need to set the selection formula for the subreport, but everything I have found says to setup a new instance of the report, get a reference for the subreport and set the recordselection formula. 
        MySubReport = MyReport.OpenSubreport("TerritorySalesRecap.rpt")
        MySubReport.RecordSelectionFormula = MySelectionString
The code runs, be the selection formula does not get set.  Any ideas?

SOLUTION!!! 
I did have to use the report engine instead of the viewer, but there is a pretty easy way to do it if you search and wade through enough of the msdn documentation:
Dim TerrRpt As TerritorySalesReport = New TerritorySalesReport
' set parameters in the main report
TerrRpt.SetParameterValue("RptMonth", Month(Request.QueryString("id5")))
TerrRpt.SetParameterValue("RptYear", Year(Request.QueryString("id5")))
TerrRpt.SetParameterValue("SalesCompany", Request.QueryString("id3"))
TerrRpt.SetParameterValue("RptMonthName", MonthName(Month(Request.QueryString("id5"))))
TerrRpt.SetParameterValue("RptMonthNameAbbv", MonthName(Month(Request.QueryString("id5")), True))
' add parameter to subreport
TerrRpt.SetParameterValue("RptMonth", Month(Request.QueryString("id5")), "TerritorySalesRecap.rpt")
' specify selection formula
sql = "{Invoice.IVM_InvoiceType} in [0, 2] AND {@InvDate} in Date (" & date1 & ") to Date (" & date2 & _
        ") AND NOT {Invoice.IVM_ReversedFlag}"
' Add it to the main report
TerrRpt.RecordSelectionFormula = sql
' and to the subreport
TerrRpt.Subreports.Item("TerritorySalesRecap.rpt").RecordSelectionFormula = sql
' Lastly - bind the report
Me.CrystalReportViewer1.ReportSource = TerrRpt

Similar Messages

  • CRVS2010 Beta - Database login fails after setting select formula

    I am working through how to call the report and have it print programatically.  I was able to get it to print with the saved data, but as soon as i add a recordSelectionFormula to it, it fails saying the login is incorrect.  I have searched the forums and tried the different resolutions some people have used, but it still fails for me.  What about the select formula would cause this issue?  below is the code i am using.  Please let me know what I am missing, thank you.
                ReportDocument crDoc = new ReportDocument();
                crDoc.Load("c:
    shipmgmt
    reports
    PackingSlip.rpt");
                crDoc.SetDatabaseLogon("user", "password", "localhost", "shipmgmt");
                crDoc.RecordSelectionFormula = "{ld_mstr.ldm_nbr} = \"13994\" AND {ld_mstr.ldm_ord} = \"665527\"";
                Object sfVal = new Object();
                sfVal = "R&S COLUMBIA";
                Object prncases = new Object();
                prncases = false;
                crDoc.SetParameterValue("shipFrom", sfVal);
                crDoc.SetParameterValue("prnCases", prncases);
                crDoc.PrintOptions.PrinterName = "
    wc-printserver
    wccsr";
                crDoc.PrintToPrinter( 1, false, 0, 0 );
                crDoc.Dispose();

    Hello,
    Copy the record selection formula from the Designer and paste that into your code, then use a report without the record selection formula saved in it and test again.
    Next step is what database and driver are you using? Joinbuilder registry keys were for old legacy drivers. This may be an issue with the driver configuration.
    ALSO, don't use "localhost" as your Server name or DSN name etc. Try replacing it with the actual DB server/machine name:
    crDoc.SetDatabaseLogon("user", "password", "localhost", "shipmgmt");
    Thanks again
    Don

  • Using Date Range parameter in Subreport Selection Formula

    I have a subreport which includes this line in the selection formula:
    {Production.Date} = {?Pm-?DateRange}
    {?Pm-?DateRange} appears in the Subreport Links window, so it seems like it should work.
    The DateRange parameter is set by the user in the Main report.
    But the subreport returns no records.
    I tried this:
    In the Main report I created a StartDate and a StopDate field from {?Pm-?DateRange} .
    Then in the subreport selection formula I used these two formula fields like this:
    {Production.Date} >= @StartDate
    and
    {Production.Date} <= @StopDate
    This works!
    So I have found a workaround, but still, I don't understand why the original code {Production.Date} = {?Pm-?DateRange} returns no records.
    Thanks,
    Art

    Hi Art,
    You cannot use a date range parameter directly in the subreport's record selection formula.
    You'll need to create a formula in the Main report like this:
    Minimum(?DateRange) //This gives the start date
    Maximum(?DateRange) //This gives the end date
    Then send these formulas as parameters to subreport for use in the record selection formula.
    I think you've already got this figured out anyway!
    -Abhilash

  • "Missing parameter values." Error when setting record selection formula

    Setup - VS 2008, CR 2008 (v12.0), Win XP & C#.Net
    I have a form which loops through all parameters (non-linked to sub reports, so only off the main report) and allows users to enter the values for each parameter. When hitting the preview button, I loop through all of the saved values, set the parameter field values and then add any additional filters into the recordselection formula as below. The problem i'm having is that the ReportDocument.HasRecords returns true if the ReportDocument.RecordSelectionFormula doesn't filter out every result.
    For example, I have a list of customers and if I set the selection formula to filter out a specific customer, ReportDocument.HasRecors returns true, if I set the selection formula to filter something that doesn't exist i.e. customer "xk39df", the moment this line of code runs "ReportDocument.RecordSelectionFormula = rsFormula;" - ReportDocument.HasRecors returns the following exception as opposed to "False".
    Message: Missing parameter values.
    Source: CrystalDecisions.ReportAppServer.DataSetConversion
    StackTrace:    at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.hasRecords()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_HasRecords()
    ErrorID: MissingParameterFieldCurrentValue
    The strange thing is, it works fine if the recordselectionformula selects a record which exists in the results - all parameters have a current value except for the linked parameters.
    This one has got me stumped!
    foreach (ParameterFieldDefinition parameterField in ReportDocument.DataDefinition.ParameterFields)
                    var query = ReportObjects.Values.Cast<Filters>().Where(objects => objects.ParameterName == parameterField.Name.ToUpper().Trim());
                    foreach (var item in query)
                        parameterField.CurrentValues.Clear();
                        parameterField.CurrentValues.Add(item.ParameterValue);
                        parameterField.ApplyMinMaxValues(item.MinLength, item.MaxLengh);
                        parameterField.ApplyCurrentValues(parameterField.CurrentValues);
                var records = ReportObjects.Values.Cast<Filters>().Where(recordSelection => recordSelection.RecordSelectionFormula.Trim().Length != 0);
                foreach (var item in records)
                    rsFormula += item.RecordSelectionFormula;
                if (rsFormula.EndsWith(" AND "))
                    rsFormula = rsFormula.RTrim(5);
                ReportDocument.RecordSelectionFormula = rsFormula;

    Hi,
    The report has it's own ADO Datasource set in crystal reports, so I just pass the log on information to the report object before doing anything else.
    this.DataSourceConnections[0].SetConnection("ServerName", "Database", "sa", "Password");
    I then do a refresh before applying the parameter values (I do this because the user can preview the report more than one time by using a preview button on the parameter form without re-loading the report object)
    this.Refresh();
    Then I set all parameter values followed by setting the recordselection formula.

  • Use same selection formula in different subreports

    I have got a main report that will have its own selelction formlua, then im planning to have multiple subreports that will use part of the selection formula from the main report in addition to its own selection formula. So i want know if there is way where  if I make a change to the main selection formula it reflects in the subreports as well.
    For Example
    main report:
    {ContractsTable.Contract}="123456"
    subreport 1
    {ContractsTable.Contract}="123456" and
    {ContractsTable.Country}="United Kingdom"
    subreport 2
    {ContractsTable.Contract}="123456" and
    {ContractsTable.Region}="East"
    What im trying to figure out is that if change the parameter for the {ContractsTable.Contract}  from "123456"  to "789125" in the main report, i want the change to reflect in the subreports as well.i dont want to be going to each subreport and changing the parameter.
    I have tried to work out a solution using shared variables and parameters,but failed miserably.Has anyone git any ideas?

    Hi Thomas,
    You can the option "Change Sub report Link" and link the 2 subreports with the parameter the mainreport uses.
    For Example if Main Report Uses Parameter ?Contract
    Then link that with each Sub report Parameters ?Contract1 and ?Contract2
    So When you refresh the Main report it only asks for one parameter i.e ?Contract
    and all the Sub reports runs according to it.
    Thanks,

  • Select formula works with one set of data but not another??

    Post Author: rkckjk
    CA Forum: Formula
    I have the folloing Select formula:{Sheet1_.Assign Group History} = '{"COMPUTER OPERATIONS"}' and{Sheet1_.Resolved By Group} = "COMPUTER OPERATIONS"That I'm using to select records from an Excel spreadsheet. It works fine with the Jan. 2008 spreadsheet file: Test MTTR Jan 2008.xlsbut not with the Feb. 2008 spreadsheet: Test MTTR Feb 2008.xlsWhen I use the Feb. 2008 file I get this error:"Query Engine Error:'Error code: 0x800a06ff Source: DAO.Recordset Description: this expression is typed incorrectly, or it is too complex to be evaluated."Basically both Excel files are in the same format but have different data in them. I don't understand why Jan's works, but not Feb's???
    Since, I can't upload the two files without contacting the system administrator, maybe someone can help me debug the error code or how to debug this error using another method or idea??

    Post Author: sharonmtowler
    CA Forum: Formula
    did you try each sheet while removing one of the select statements?  i would start there and try feb with no select statement, add one in, then the next
    see what is causing your problem. it sounds like some data in the xls file is in an incorrect format.

  • Setting RecordSelectionFormula to multiple subreports is not working.

    Hello,
    I have an application vb.net Vs2005 winform an Crystal Report for .NET.
    I have a report whith 3 subreports : i want to specify RecordSelectionFormula for the 3 subreport but it work only for one (the last have set) :
    Part of my code :
      Dim dob_Report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
    dob_Report.SetDatabaseLogon("SYSTEM", "pass@123", "CP", "DB_LIVE")
                    Dim Tables As CrystalDecisions.CrystalReports.Engine.Tables = dob_Report.Database.Tables
                    Dim table As CrystalDecisions.CrystalReports.Engine.Table
                    For Each table In Tables
                        table.LogOnInfo.ConnectionInfo.ServerName = "CP"
                        table.LogOnInfo.ConnectionInfo.DatabaseName = "DB_LIVE"
                        table.LogOnInfo.ConnectionInfo.UserID = "SYSTEM"
                        table.LogOnInfo.ConnectionInfo.Password = "pass@123"
                        table.ApplyLogOnInfo(table.LogOnInfo)
                        table.LogOnInfo.ConnectionInfo.AllowCustomConnection = True
                           table.Location = "DB_LIVE." & Mid(table.Location, InStrRev(table.Location, ".", Len(table.Location)) + 1)
                    Next
                    Dim osubrpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                    For i As Integer = 0 To dob_Report.Subreports.Count - 1
                        osubrpt = dob_Report.Subreports.Item(i)
                        Dim subrpt_Tables As CrystalDecisions.CrystalReports.Engine.Tables = osubrpt.Database.Tables
                        For Each table In subrpt_Tables
                            table.LogOnInfo.ConnectionInfo.ServerName = "CP"
                            table.LogOnInfo.ConnectionInfo.UserID = "SYSTEM"
                            table.LogOnInfo.ConnectionInfo.Password = "pass@123"
                            table.LogOnInfo.ConnectionInfo.DatabaseName = "DB_LIVE"
                            table.ApplyLogOnInfo(table.LogOnInfo)
                            table.LogOnInfo.ConnectionInfo.AllowCustomConnection = True
                                                table.Location = "DB_LIVE." & Mid(table.Location, InStrRev(table.Location, ".", Len(table.Location)) + 1)
                            'table.ApplyLogOnInfo(table.LogOnInfo)
                        Next
                        osubrpt.VerifyDatabase()
                    Next
                    dob_Report.VerifyDatabase()
    '... I passed the code that set log info on the table of report and subreport
                            dob_Report.OpenSubreport("Summary").RecordSelectionFormula = "{a.DOCDATE} >= date(" & strFromDate & ") " & " AND " & "{a.DOCDATE} <= date(" & strToDate & ")" & " AND " & "{a.LOCATIONCODE} = '" & strLocation & "'" & " and " & "{a.DOCTYPE} = '" & "I" & "'" & stroption
                            dob_Report.RecordSelectionFormula = "{s.DOCDATE} >= date(" & strFromDate & ") " & " AND " & "{s.DOCDATE} <= date(" & strToDate & ")" & " AND " & "{s.LOCATIONCODE} = '" & strLocation & "'" & " and " & "{s.DOCTYPE} = '" & "I" & "'" & " and " & "{s.ex} <> '" & "exp" & "'" & stroption
    'Now i want to set RecordSelectionFormula  for subreport
      form1.crystalreportviewer1.ReportSource = dob_Report
                form1.Text = strFormTitle
                form1.ShowDialog()
    when i do that
    first and second subreport don't apply the RecordSelectionFormula and show all data
    third subreport is displaying proper.
    I've tried dob_Report.OpenSubreport(0) this method also but results are same.
    Environment:
    Visual Studio 2005, Crystal Report 10, SAP HANA Studio, SAP 9.0

    Hi Ashish
    Couple of things. You mention you are using CR 10, but I am not sure if this is the version of CR that bundled with VS 2005 (CR 10.2), or a stand-alone version of CR. So. Assuming that this is CR 10.2, make sure you apply SP 1:
    Crystal Reports for VS 2005 and  VS 2008 Updates & Runtime Downloads
    Then see KBA 1204895 - Selection formula is ignored when using Crystal Reports 2008 and VS .NET 2005
    Finally, you may want to consider using the code below:
    //I loop through all the sections looking for subreports and set the log on info, same as the main report:
    foreach (CrystalDecisions.CrystalReports.Engine.Section crSection in crSections)
        crReportObjects = crSection.ReportObjects;
        //loop through all the report objects to find all the subreports
        foreach (CrystalDecisions.CrystalReports.Engine.ReportObject crReportObject in crReportObjects)
            if (crReportObject.Kind == ReportObjectKind.SubreportObject)
                //you will need to typecast the reportobject to a subreport object once you find it
                crSubreportObject = (CrystalDecisions.CrystalReports.Engine.SubreportObject)crReportObject;
                string mysubname = crSubreportObject.SubreportName.ToString();
                //open the subreport object
                crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);
                //set the database and tables objects to work with the subreport
                crDatabase = crSubreportDocument.Database;
                crTables = crDatabase.Tables;
                tableIndex = 0;
                bool SecureDB;
                //loop through all the tables in the subreport and set up the connection info and apply it to the tables
                foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
                        crConnectioninfo.UserID = "sa";
                        crConnectioninfo.Password = "PW";
                        crConnectioninfo.DatabaseName = "QTYLTD";
                        crTableLogOnInfo = crTable.LogOnInfo;
                        crTableLogOnInfo.ConnectionInfo = crConnectioninfo;
                        crTable.ApplyLogOnInfo(crTableLogOnInfo);
    crSubreportDocument.RecordSelectionFormula = <selection formula>
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Exporting to PDF - Selection Formula confirmation message

    Hi,
    We're using Crystal Reports 11 from within a Delphi 7 application which, on a timed schedule, loads data into a MS SQL server database and generates and prints or e-mails a report of the data loaded in PDF format. This process should be automatic and not require monitoring but we're now seeing the report generation being stalled by a confirmation message appearing when the report is generated. The message reads:
    Confirm
    Selection Formula for {Report Name} to Printer   // or To Export
    {Selection Formula Here}
    Continue?
    (RETRY=edit with Crystal, All=copy to clipboard)
    Buttons: Yes No Retry All
    Any help appreciated.
    Thanks,
    Garry

    I'm wondering if this could be easily fixed by going to the links panel and then use the "Copy Links To" and set up a new links folder for the job.
    That would copy all the links and then relink to that folder - right?
    Perhaps that's a quick way to get rid of this problem.
    It could be anything though - I've had weird, but not this problem, of files that are on a server can cause link problems.
    I don't know - it's a one of those have to sit down and look at the files to see what's going on situation - like Bob already said.

  • Selection formula sporadically does not push to database.

    On CR 2008, SP3 - Oracle 10 database using native connection, report called from VB.NET:
    We have a process that iteratively loads an .RPT, prints to file and inserts file into database.   Report is fairly complex, 15 subs, lots of groups, etc.   When we run this report on a somewhat large database (source tables range from 1M to 6M rows), it will process just fine for several iterations (10 to 30), but then it will run and NOT push selection criteria to the database via the SQL Query.  We're watching the queries in the database as it runs, and see that every so often it fails to send the where clauses.  With 5M rows, this causes a significant delay as it pulls all the rows in and applies selection criteria locally.
    We're very experience CR developers (partners).  I'm pretty sure we haven't missed anything.  The main report and all subs have been reviewed to make sure that "Use Indexes Or Server For Speed" is selected, and that no selection formulas include native CR functions that would prevent the selection formula from being pushed to the server.  When reviewed in design mode, SQL Queries for main and all subs show with WHERE clauses.
    Any thoughts for anything else we can review?
    Does anyone know exactly what criteria CR uses to determine whether to push the selection formula to the server (other than what I mention above)?
    Thanks, Bill
    Edited by: wlpearce on Jan 12, 2011 4:42 PM

    Hi Bill,
    Need more info, what version of Oracle client and Server are they using? Windows or WEB app?
    Are you closing and disposing of the report document each time? This should disconnect the DB driver and free up the connection. It could be a Client issue but need more info.
    I've never seen or heard this happening before so not sure what or why. If CR has the WHERE clause in the original report then there is no reason why it would drop it... Unless the registry key can't be read due to system resources, not sure how your app works so not sure what may affect it.
    Be sure to get Millie to note the patch level and DB Server/Client version being used and as much info as you have. Also the code you use to set database connection and attach a report that it fails on so I can see the option used in the RPT file also.
    Thanks again
    Don

  • Inner select and select in "record selection"- Formula workshop problem

    Hi,
    I am facing a bit tough situation in creating a Crystal Report.
    I have two queries which I need to accommodate in the Report according to a given parameter (selectionParameter).
    The queries are as follows:
    select total, minvalue, customer
    (select  sum(A) TOTAL, min(B) minValue, C customer
         from table1, table2
         where table1.A = table2.E
         AND B in (Select B from table3 where F=10)
         group by C
    order by total, minValue
    select total, minvalue, customer
    (select  sum(A) TOTAL, min(B) minValue, C customer
         from table1, table2
         where table1.A = table2.E
         AND C in (Select C from table4 where G=20)
         group by C
    order by total, minValue
    These queries should be executed according to the selectionParameter set to 0 or 1. The only difference in these queries in one of the where clauses. In the formula workshop "record selection"- I have put an if clause.
    if(selectParameter = 0) then (B in (Select B from table3 where F=10)
    else C in (Select C from table4 where G=20).
    This is not supported, since select statement cannot be used in the formula workshop!!.. And also, I have understood that what ever procedure I have been following is completely wrong, since the where clause written in "record selection" formula workshop applies to OUTER SELECT, but not to inner select, which is not what I want!!.
    Please help me to solve this puzzle. I am eagerly waiting for a solution.
    Thanks and Regards,
    Janakiram Dandibhotla.

    A command object is really the only way to create a custom SQL query in Crystal Reports.  You have the option to create a command object after you connect to your datasource.
    Alternatively you can create a JavaBean class, create the custom query in the java page, retrieve the resultset, and use that in the report.

  • Pass the results from a selection formula to the default values for a parameter field

    Post Author: kevans
    CA Forum: General
    Crystal 10 u2013 SQL 2000
    I want to create a parameter field that will display all of our IT Departments so the end user can select the one they want to run the report against, such as IT-Security, IT-Network, etc. about 40 in all.  BUT I donu2019t want this to be a static list where I type in all 40 depts in the default list, I was hoping I could do something more dynamic such a formula field that says u201C if {group.name startswith u2018ITu2019 then {group.name}u201D and then have the parameter field pull from this source.
    Iu2019m sure this has been answered in a previous post but Iu2019m not finding it.  I see stuff on creating a record selection formula such as u2018if {?group} like u2018IT-Secur*u2019 thenu2026u201D  but this leaves too much room for error if people donu2019t type the name correctly.  Maybe Iu2019m not using the record selection formula correctly?  Sorry if I offend anyone but I just upgraded from 8 to 10 and thought for sure this option would be in 10, perhaps built right into the parameter default value page where you can place in select criteria but NOTHING has changed.

    Post Author: sharonmtowler
    CA Forum: General
    if you are creating the parameters in the rpt file, it will only pull values you enter, or directly from the database
    in the record selection you can do something like this, so if they only enter the first 2 characters it should pick up only the IT etc.
    (if eft(,2)={?parameter} then true else ={?parameter})

  • How do I use a running total within a selection formula?

    I am developing a report within Crystal Reports 2008.  My goal is to identify any accounts that have zero usage for at least six months in this current year.  I have account number, meter size, read date, usage, and a running total/subtotal by account.
    Here is what the data looks like in the report
    ACCTNO     METER SIZE   READ DATE/TIME               READ_USAGE    Counter
    001022-05                    
    001022-05     2.00              9/28/2009  9:42:00 AM      0.00                     1
                                                                                    1
    001110-09               
    001110-09     2.00             3/2/2009  9:54:13 AM         0.00                      1
    001110-09     2.00             3/26/2009  1:32:28 PM        0.00                      1
    001110-09     2.00             4/27/2009  11:02:11 AM     0.00                      1
    001110-09     2.00             5/27/2009  1:13:53 PM        0.00                      1
    001110-09     2.00             6/19/2009  11:41:20 AM     0.00                      1
    001110-09     2.00     9/1/2009  8:13:25 AM         0.00                      1
                                                                                    6
    My report shows all accounts that have zero usage.  I want to filter the report to only show the accounts that have at least six zero usage reads.  I thought I could add a running total, sum it, and filter the data by using the selection formulas.  Unfortunately I keep getting an error message saying "this field cannot be used becuase it is being evaluated later."  Any help would be appreciated.  This is the first report I have created using crystal.
    Edited by: smwdrw2 on Oct 28, 2009 4:29 PM

    You could Conditionally suppress the account numbers where your running total is less than 6
    You will probably have to put your account number summaries in the group footer, instead of the header.
    Then:
    go to the section expert, click on the group footer for the account number, on the right, next to the word "Suppress" click on the box that says "X-2". In the formula put
    IF<6 then True
    Save and close
    The only way this would not work for you is if you have some sort of grand total that you don't want to include the other groups in.

  • How to set selected file in FileChooser showSaveDialog to default file name

    Hi,
    How do I set selected file in JavaFX 2.0 FileChooser showSaveDialog, so I can prompt the user with a suggested default file name?
    I am converting a Java Swing application I wrote a few years ago to JavaFX 2.0.
    In the Swing application, I use setSelectedFile() as follows:
    JFileChooser jFileChooser = new JFileChooser();
    jFileChooser.setSelectedFile(new File(backupfile));
    jFileChooser.setCurrentDirectory(new File(outputDirectory));
    FileFilter filter = new FileNameExtensionFilter("Comma Delimited (*.csv)", "csv");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setFileFilter(filter);
    filter = new FileNameExtensionFilter("XML Document (*.xml)", "xml");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setAcceptAllFileFilterUsed(false);
    jFileChooser.setDialogTitle("Export File");
    int returnVal = jFileChooser.showDialog(jFrame, "Export");
    This would show a file chooser with the file name text field pre-populated with a default backup file name.
    I can't find an equivalent in JavaFX.
    Also, in the Swing application, I was able to determine which extension filter was selected at run time using getFileFilter().getDescription() as follows:
    String extension = jFileChooser.getFileFilter().getDescription();
    if (extension.equals("XML Document (*.xml)")) { ...
    I can't find an equivalent in JavaFX.
    Thanks,
    Barry

    You can use the open sequence file method on the application manager (then you only need to wire the file path)
    Rodéric L
    Certified LabVIEW Architect

  • Problems with the selection formulas in CR

    Hi Experts! I need help...
    I made a report using Crystal Reports, the problem is when I run it on Crystal Reports, it shows me some information, but when I make a preview in SAP Business One or import it to SAP Business One , some information dissapear, I think it´s because of the Selection formulas but I don't know how to solve it ...
    The report come from a view in SQL and this is my selection formula:
    if month({vwComisiones.Fechafactura})=month({vwComisiones.FechaPago}) then
    ({?fechaini}<= {vwComisiones.Fechafactura} and {vwComisiones.Fechafactura}<={?fechafin})
    -- I just need the Invoices that have been paid on the same month --
    Any ideas?

    Hi,
    Have you tried omit IF like below:
    month({vwComisiones.Fechafactura})=month({vwComisiones.FechaPago}) and {?fechaini}<= {vwComisiones.Fechafactura} and {vwComisiones.Fechafactura}<={?fechafin}
    Thanks,
    Gordon

  • Report Selection Formula Error with Crystal Reports 2008 SP3 Fix Pack 3.5

    Hello,
    My name is Carlos, and I would like to report a defect found in the Crystal Reports 2008 SP 3 Fix Pack 3.5 Runtime that is affecting the majority of our reports.  As well, I would like to ask if there is a simple workaround that does not involve updating hundreds of reports.
    The issue is that the runtime engine incorrectly returns the report selection formula.  I have included sample code showing what I mean.
    To reproduce;
    1. Create a simple report that has a date range filter like: 
      ({Orders.Order_Date} >= {?START_DATE})  
      AND ({Orders.Order_Date} <= {?END_DATE})
    2. Create a test app as follow that loads a report using the following code:
    ReportDocument rpt = null;
    try
      rpt = new ReportDocument();
      rpt.Load("TestReport.rpt");
      this.txtMessage.Text = string.Format(
        "ReportSelectionFormula:{0}{1}",
         Environment.NewLine,
      rpt.RecordSelectionFormula);
    catch (Exception ex)     
      this.txtMessage.Text = ex.ToString();     
    3.  Install Crystal Reports 2008 SP3 Fix Pack 3.5 Runtime [https://smpdl.sap-ag.de/~sapidp/012002523100006341772011E/cr2008fp35_redist.zip]..
    4.  Execute the app.
    At this stage, the screen shows
    ReportSelectionFormula:
    (   (  NOT  {Orders.Order_Date} >= {?START_DATE}  )   AND   (  NOT  {Orders.Order_Date} <= {?END_DATE}  )   ) 
    The expected value is:
    ReportSelectionFormula:
    (   (  {Orders.Order_Date} >= {?START_DATE}  )   AND   (  {Orders.Order_Date} <= {?END_DATE}  )   ) 
    If we were to repeat the same test above but use the Crystal Reports 2003 SP3 runtime (i.e. no Fix Pack), which can be dowloaded from [https://smpdl.sap-ag.de/~sapidp/012002523100007123592010E/cr2008sp3_redist.zip], we would get the correct report selection formula. A side-effect for this incorrect report selection formula is a runtime exception complaining about an errorkind and a boolean being expected. 
    Do you know if there is any workaround that I can apply in code, perhaps a different Fix Pack?  Is there a Fix Pack expected to be released soon?  It is not practical for us to update our reports and use a different style in the record selection formula because we have many such reports, and our customers probably have even more.
    Thank you.
    -Carlos.

    Already a known issue, here's the [KB 1584095 - A boolean NOT is added at the beginning of a record selection formula when the report is loaded by the Crystal Reports .NET SDK |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533383334333033393335%7D.do]

Maybe you are looking for