Changing Subreport filter in VBA

I have a form "PriceListPrint" that has a field named "CategoryID" and command button to open a report "PriceListEnglish". In the form before the open report command
there is this line: CategoryID="Rest"
In the report there is a subreport "PriceListBeef" that has 2 fields "CategoryIDRest" and 
"CategoryIDRest2" I only want to show one or the other, not both, if I manually go into the subreport "PriceListBeef" in the Filter Property and write in either of the controls it works, When I tried to do it in code on the
"On Load" of the subreport:
If Forms![PriceListPrint]![CategoryID]="Rest"
then
Me.Filter="CategoryIDRest='Rest'"
Me.FilterOn=True
Else
Me.Filter="CategoryIDRest2='Rest2'"
Me.FilterOn=True
End If
It gives this error "The setting you set isn't valid
for this property"
If I click on “Debug” this line is highlighted in yellow:
Me.Filter="CategoryIDRest='Rest'"
I am working with Access 2002
Mario Jaile

Ken,
Thank you for your time.
Sorry I forgot to say that "PriceListRestaurantEnglish" report is only a holder for 7 subreports,
the names of the subreports are as follows:
"PriceListRestaurantBeef", "PriceListRestaurantDeli", "PriceListRestaurantPork", 
"PriceListRestaurantPoultry", "PriceListRestaurantSea", "PriceListRestaurantGoat","PriceListRestaurantFruit"
Mario Jaile

Similar Messages

  • Missing Parameter Values while using Change SubReport links

    Hi,
    I am using Change SubReport Links to pass data from Main Report to the SubReport. The report works fine at design time when I preview it, but at runtime I get "Missing Parameter Values" error.
    As I have used Chanage SubReport Links do I still need to pass the parameter to the SubReport from the code.
    cr.Export gives this error.
    Below is the code
    ExportOptions crExportOptions;
            DiskFileDestinationOptions crDiskFileDestinationOptions;
            string Fname = string.Empty;
            string strReportName = string.Empty;
            ReportDocument cr = new ReportDocument();
            string strReportPath = Request.PhysicalApplicationPath.ToString() + @"Members\Reports\UnPaidReceipt.rpt";
            if (!System.IO.File.Exists(strReportPath))
                throw (new Exception("Unable to locate report file:\n" + strReportPath));
            cr.Load(strReportPath);
            MtollBLL Unpaid = new MtollBLL();
            cr.SetDataSource(Unpaid.GetUnpaidPayments().DefaultView.Table);
            // Set the Crytal Report Viewer control's source to the report document.
            CrystalReportViewer1.ReportSource = cr;
            MtollBLL Violation= new MtollBLL();
            cr.Subreports[0].SetDataSource(Violation.GetReportViolation().DefaultView.Table);
            // cr.PrintToPrinter(1, False, 0, 0)
            Response.Write( cr.Subreports[0].DataDefinition.ParameterFields.Count);
            Fname = Request.PhysicalApplicationPath.ToString() + Session.SessionID.ToString() + ".pdf";
            crDiskFileDestinationOptions = new DiskFileDestinationOptions();
            crDiskFileDestinationOptions.DiskFileName = Fname;
            crExportOptions = cr.ExportOptions;
            crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
            crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
            crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
            cr.VerifyDatabase();
            cr.Subreports[0].VerifyDatabase();
            cr.Export();//' The following code writes the pdf file to the Clientu2019s browser
    Please Advise.

    Please post your SDK development questions to the Developers forum

  • Change pointer & filter

    hi,
    may i know what is the use of change pointer, filter in distribution model?
    thanks

    Hi,
    check this
    what is the use of change pointer concept in ale?
    Re: Adding a Filter in a distribution model
    hope it helps you.
    Thanks!

  • Global Change or filter based on Min and Max dates

    Hi Guys,
    Hopefully there is a genius out there that is an expert with filters and or global changes, I am after a solution and can’t work out if it is possible to do in P6.
    Based on a filter (using codes to select a group of activities) I want to write a value into two date UDF Fields can I:
    Run a global change to give the earliest and latest date in the group and write the result to all tasks in the group? or
    Is there a mindate maxdate option in Global change or filter? Or
    If these tasks were grouped in the activity view can a global change be written to fill down the dates that the summary level is displaying, which are essentially the min and max dates of the groups.  
    I could do this pretty easily in excel but I have over a 100 projects and doing the import one at a time is not feasible.
    I could create LOE’s but as my variables are constantly changing and due to the volume also not an option.
    Summary bars are not an option eithers as I am writing the UDF’s to get all the bars I want on one line, 
    An option for me might be to do it using Legare but I would prefer to see if I can get it done in P6 first.
    Cheers
    Rob

    Yes, you can do it in one report.
    I created a sample report from efashion:
    Year | Lines | Sales Revenue
    2001 | Accessories | $250
    2003 | Accessories | $550
    2001 | City Skirts | $1050
    2003 | City Skirts | $1150...........
    Create 2 variables 1) Count and 2) Difference:
    1) Count  as formula - =Count([Lines]) In Report
    2) Difference as formula - =Sum([Sales revenue]) Where (Max([Year]) In Report = [Year]) - Sum([Sales revenue]) Where (Min([Year]) In Report = [Year])
    You can replace the formula with your report variables. Then just drag Site ID, Count and Difference variables to your report.
    Thanks
    Jai

  • How NOT to edit SSIS dtsx packages manually to change config filter in SQL Server configuration schema

    I have many packages that are using the package configuration with the following way:
    -ALL Packages have the XML configuration file that has only one proporty defined. The ConnectionString of the SQL Server connection that holds the configuration table for the rest of the properties
    -A SEPARATE SQL Server package configuration for
    each connection manager in the package. 
    -Finally an SQL Server configuration for all the properties that are specific to this package.
    I attach a pic of what i mean: Yellow is the XML config with the connectionstring, Blue the connectionamangers and purple the package specific.
    So with this setup  i can:
    -Change the xml file location and just point all the setup in another sql server or another database.
    - Or create different configuration filters in the same config table and try to go into the package and change the filter.
    With all the above the problem is that if i do anything from within VS, i am loosing the password in the connectionstring because i am not using the encrypt property. And i dont want to use it...
    What are my options? Just go in .dtsx with notepad and chage what i want BEFORE i open the package or before i deploy?
    Elias

    You are correct but:
    -I dont want to use EncryptSensitiveWithPassword, so:
    When i go to package configuration and try to change the ConfoigurationFilter to point to another setting then i am getting to the screen to select the property (connectionstring) and when i finish the DATABASE record for the setting is cleared from the
    Password= that i have put previously.
    So i short what i want:
    -No EncryptSensitiveWithPassword 
    -Being able to change configuration from within VS WITHOUT resetting the connectionstring string. 
    Elias
    Nope what you're asking is not possible
    There's certainly a purpose why each of things are given in the current format
    For design level settings you need to use connection manager properties and for it to persist values for someone other than creator to use you need to use protection level as EncryptSensitiveWithPassword 
    And for runtime settings you need to specify values in config which has to be editted from outside the package by editing dtsconfig file or using update query depending on whether config is stored in file/table. In both the cases you can identify password
    as a separate config item and modify its value from outside. That will work regardless of what you chose as protection level
    see
    http://blogs.msdn.com/b/runeetv/archive/2009/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Changing a Filter Over Time

    I've had a lot of trouble with this. I'm trying to change a filter over time (i.e. make a voice get more reverberative as it continues). I've had a little luck with some filters--some of the options for the filter show up on the envelope line so I can set key frames, but more often than not, nothing shows up there at all, or what does show up there is not the option I want to change.
    For example, say I want to change pitch over time. The only option that shows up that I can set key frames for is the delay rather than the pitch.
    I know I'm missing something simple here.

    So, I take it that you're in STP, working on a multi-track project.
    In the lower left on the effects tab, go to the correct track/effect you want to change, and click the disclosure triangle to show all of the parameters. Check the box to the right of each parameter you want to change over time, and it will be added to the available envelopes.
    Hope this helps!

  • Request to change the Filter in discussions

    Hi,
    I was trying to look over the open topics in one forum and set the filter to show that. It appears that archived posts show up unanswered, so this isn't useful for me to find some questions to address.
    Would you consider changing the definition of open to not include archived posts (or add a new criteria to just select the posts that are unanswered but still able to be answered)?

    Gladly - thanks for helping run such an awesome community. It's really amazing the to level of help to be gotten and how easy it is to try to give back a bit here...

  • Changes to filter list allowed senders causes errors and emails to stop

    Hi,
    Running Forefront 2010 and Exchange 2007
    When I change filter settings including allowed sender list and then press save my email system crashes and I see numerous errors in the event log such as:
    7011 - none of the antimalware engines selected for real time scanning have been initialized
    5314 - could not initialize spyware scanner
    I can eventually force it back into life by restarting the Forefront Server Protection Service (that includes MS Exchange Info store and transport services) - actually a restart fails and they all need a manual restart.
    Is this a "feature" or am I doing something wrong?
    Thanks,
    Julian

    Hi,
    are you running the latest build of FPE?
    Here is the link for rollup 4:
    http://support.microsoft.com/kb/2619883/en-us
    And a critical hotfix for rollup 4:
    http://www.microsoft.com/en-us/download/confirmation.aspx?id=41836
    Greetings
    Christian
    Christian Groebner MVP Forefront

  • Change subreport connection

    I have a report with a subreport and I need to change both connections in execution.
    I make this:
    For Each subReport As CrystalDecisions.CrystalReports.Engine.ReportDocument In customerReport.Subreports
                                        For Each connection As CrystalDecisions.Shared.IConnectionInfo In subReport.DataSourceConnections
                                            customerReport.DataSourceConnections("xxxxxx", "sql2005").SetConnection           ("xx.xxx.xxx.xx", "sql2005", "xxx", "xxxx")
                                            subReport.SetDatabaseLogon("xx.xxx.xxx.xx", "sql2005", "xxx", "xxxx")
                                            subReport.DataSourceConnections("xxxxxxxx", "sql2005").SetConnection("xx.xxx.xxx.xxxx", "sql2005", "xxx", "xxxx")
                                        Next
                                    Next
    But show me an error like this:
    It was not possible to recover the information of the database. Details: [Code of the supplier of database: 208]
    What

    Moved to .NET SDK forum
    Search here, there are LOTS of posts on how to set location for the main and subreport using code.
    Don
    PS - the link you posted is the home page to Forums.
    Edited by: Don Williams on Jan 2, 2012 3:21 PM

  • BADI HRHAP00_SMARTFORMS01 reverting back the changes to filter value

    HI Experts,
    I am working on the BADI HRHAP00_SMARTFORMS01.
    I created a 'Z' copy of its standard implimentation 'HRHAP00_SMARTFORMS01' . I changed the value of its standard filter  'STANDARD' to a 'Z'  value and then accidentally deleted the value 'STANDARD' from table  T77HAP_FLT_EXI_T.
    Is there anyway by which these changes can be reverted.??
    Thanks.

    Hi,
    See if any versions are available. If so you can revert it to the previous version.

  • How to change drill filter values of all reports at the same time

    Hi,
    The Webintelligence users in our environment usuallly use drill filters in their document's reports. We'd like to find a way to change the drill filters' values of all reports when one value is selected. I mean, we need a work around to change the drill filters of all reports at the same time.
    We are using Business Objects XI 3.1 (a lot of webintelligence documents available, over than 2500).
    Does someone know a way to do that? I've already looked for that a lot, but I couldn't find anything.
    Thanks in advance,
    Gustavo Borges

    Hello Gustavo,
    as you refer to a Webi problem I recommend to post this query to the [BusinessObjects Web Intelligence|SAP BusinessObjects Web Intelligence; forum.
    This forum is dedicated to topics related to the creation and design of Web Intelligence documents using the Web Intelligence Report Panels. This includes areas such as universe connectivity, prompts, charting, formatting, filters, and formulas.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Webi queries remain in one place and thus can be easily searched in one place.
    Best regards,
    Falk

  • Suggestion to Add more filter in "Change List filt...

    Hi,
    Please provide the more filters in "Contract List Filter" currenlty there is only one filter for "Online", In this "Online" it covers all "Online", "Away" and "Busy" but I want to add more filters related to Online for example:
    Online - Online
    Onlne - Away
    Online - Busy(Do Not Distrub)
    If I choose "Online - Away" then Skype will show me onlye Skype "Online but Away status".
    Thanks, 
    Iftikhar

    Thanks Gyan.
    Below is the code for creating list box :
    OAApplicationModule am = pageContext.getRootApplicationModule();
    OAViewObject listVO=(OAViewObject)am.findViewObject("LocationsLOVVO");
    OAWebBeanFactory list1 = pageContext.getWebBeanFactory();
    OADefaultListBean list = (OADefaultListBean)list1.createWebBean(pageContext, OAWebBeanConstants.DEFAULT_LIST_BEAN, null, "LocationsList");
    list.setListViewObjectDefinitionName("oracle.apps.irc.lov.server.LocationsLOVVO");
    list.setListValueAttribute("LocationCode");
    list.setListDisplayAttribute("LocationCode");
    list.setSize(6);
    list.setMultiple(true);
    list.setName("Location");
    OAMessageLayoutBean listboxbean = (OAMessageLayoutBean)webBean.findChildRecursive("AplmessageLayout");
    listboxbean.addIndexedChild(list);
    But it is not inserting all the location values in the list.
    Regards,
    Gaurav.

  • Change Twist Filter on Vector from "Virtual Filter Effect" to "Actual Vector"

    Have applied Twist Filter to a Vector Graphic, it applies "virtual kind" of twist effect to graphic, so far so good.
    However, I am trying to solidify effect so that it is no longer "virtual", and can apply further tweaks to the graphic. The desired process would be similar to "Creating Outlines" with regard to typographical characters. That is the best I can explain it.
    Any Ideas?
    Thanks in advance,
    Tom

    Thanks Scott,
    That worked perfectly !
    Tom

  • How to keep filename in textfield when filter is changed in a filechooser

    Hi, guys,
    I met a problem to keep filename in textfield when filter is changed in a filechooser
    for example, a JFileChooser has two filters
    *.jpg
    *.png
    Before I open JFileChooser, I used setSelectedFile(File) to set "aaa.jpg" as default name in textfield.
    when I change the filter to "*.png, ", I want to change the text in textfield to "aaa.png", Actually, I used setSelectedFile(File), If there is an existed file named "aaa.png", this file will be selected on fileView, but the name will not be shown on the textfield. Anybody has ideas?
    Thanks in advanced.

    I really thank you for your answer, but it seems you misunderstand what I said because of my poor english..
    what I said is:
    after you open the filechooser, the filechooser has a combobox to choose file filter and a field to show filename.
    what I want is:
    when you open the filechooser, initial name in field is "test. jpg"
    change filter, "test.jpg" will be change to "test.gif" in the field.
    I don't want to close the filechooser.
    That's why I used a listener to listen JFileChooser.FILE_FILTER_CHANGED_PROPERTY event.
    and I modified your codes
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.io.File;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.filechooser.FileFilter;
    class Testing extends JFrame {
         String defaultFile = "";
         JFileChooser fc = new JFileChooser(".");
         ExtensionFileFilter eff;
         public Testing() {
              setLocation(200, 300);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JButton btnShow = new JButton("Show Chooser");
              JPanel p = new JPanel(new GridLayout(1, 2));
              p.add(btnShow);
              getContentPane().add(p, BorderLayout.SOUTH);
              pack();
              fc.addPropertyChangeListener(new Listener(fc));
              fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
              fc.setAcceptAllFileFilterUsed(false);
              fc.setFileFilter(new ExtensionFileFilter(".gif"));
              fc.addChoosableFileFilter(new ExtensionFileFilter(".jpg"));
              defaultFile = defaultFile.equals("") ? "Test.jpg" : "Test.gif";
              fc.setSelectedFile(new java.io.File(defaultFile));
              btnShow.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        fc.showOpenDialog(Testing.this);
         public static void main(String[] args) {
              new Testing().setVisible(true);
    class ExtensionFileFilter extends FileFilter {
         String fileTypes = "";
         java.util.List extensions = new java.util.ArrayList();
         public ExtensionFileFilter() {
         public ExtensionFileFilter(String ft) {
              fileTypes = ft;
         public String getDescription() {
              return fileTypes;
         public boolean accept(File f) {
              if(f.isDirectory()) return true;
              if (f.getName().endsWith(fileTypes)) {
                   return true;
              return false;
    class Listener implements PropertyChangeListener {
        JFileChooser fChooser = null;
        Listener(JFileChooser fChooser) {
            this.fChooser = fChooser;
        public void propertyChange(PropertyChangeEvent evt) {
            if (evt.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) {
                 FileFilter fileFilter = (FileFilter) evt.getNewValue();
                if (fileFilter != null) {
                    String fileName = null;
                    if (fileFilter.getDescription().equals(".jpg")) {
                        fileName = "Test.jpg";
                    } else if (fileFilter.getDescription().equals(".gif")){
                         fileName = "Test.gif";
                    String newFileName = "C:\\" + fileName;
                    fChooser.setSelectedFile(new File(newFileName));
    }Thanks again.
    Message was edited by:
    JadeSword

  • Bug in LR 3.4 changing folders show not the 1st photo after setting rating filter

    Bug in LR 3.4 ?
    In the Library module, I have several folders.
    Folder 1 contains 100 photo's
    Folder 2 contains 100 photo's
    After rating the photo's in folder 1 (let say I rated 10 photo's with one star, then I changed the viewing status to Filters - Rated - > 1star) and I get to see the 10 photo's
    Then I switch to folder 2 (which has filters off). In stead of beginning with photo 1 (the beginning), it starts the focus on the image wich is no 17 or anyway much higher (i think the photo no of the 1st rated photo in folder 2).
    Has anyone experienced this behaviour?

    Yes,
    folder 1: Filter - Rating > *
    folder 2: Filters OFF
    And both are sorted at Capture Time. So when changing from folder 1 (with rating) to folder 2 (without rating) it starts not at the beginning.
    I have also a folder 3 without rating (same as folder 2), and if I go from folder 3 to folder 2 it starts at the beginning as it should be.
    Also: if have the following setup concerning filters:
    Library Filters: - Lock Filter
    Library Filters: - Remember each source's filter separately (so I can change the filter settings on each folder)
    NOTE, I can reproduce it:
    It appears that switching from folder 1 to folder2 (as described above) the focus on folder 2 is the first picture with a rating, and NOT the first picture at all. And that is with Filters OFF. Switching from folder 1 to folder 3 (no photos are rated in this folder),it starts at the first photo (as expected).
    Message was edited by: erwin.mvdb, additional info on reproducing the 'bug'

Maybe you are looking for

  • DVD Menu

    I am attempting to create a DVD using Premiere Elements 8.  I have created the project using one of the delivered Disc Menu templates.  The project includes Scene markers and they do appear on the scene menu page.  I can preview the project and the s

  • MDM Search From ResultSet after upgrade

    Hello, I am trying to modify a custom iview after an mdm business package upgrade to 5.5 sp06 and I'm getting an error I have not been able to resolve. A URL event is passing the [MDM Search] parameter from the ResultSet iview to my custom iview.  It

  • Get Count of Panels in Sliding Panels

    Is there a way to get the # of panels of a sidling panels widget? I'd like to add left and right arrows and gray out an arrow if they're at the end of the list of panels. The only way to do this is to find out if currentPanel = totalPanels (assuming

  • Unable to access Studio

    Hello Guys, I am not able to access the Studio. It's 2.3 version. The Endeca server and tomcat server both are running. Please help to resolve this issue. It's urgent!

  • Removing an obsolete icon next to clock...how?

    In the task bar (upper right corner where clock is, not sure what it is called) I have an icon for Kensington Slimblade track ball. I don't use this any more, the software has been uninstalled, but I don't see how to remove the icon. It is grayed out