Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

About Date Range Filter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    About Date Range Filter

    Hi,
    I'm creating sample reports using QRB from QuickBooks. And about the date range, I specify the "DataFrom" and "DataTo" field when creating a new report from QuickBooks. But after I finished creating the report, I don't know how to modify the date range.
    In some reports, there is a "Date" field in them, so I can add a filter to modify the date range. But in other reports, there isn't any field about date. So how can I control the date range of the reports without date field?Thanks.


    Juliet

    #2
    Re: About Date Range Filter

    Originally posted by Juliet View Post
    Hi,
    I'm creating sample reports using QRB from QuickBooks. And about the date range, I specify the "DataFrom" and "DataTo" field when creating a new report from QuickBooks. But after I finished creating the report, I don't know how to modify the date range.
    In some reports, there is a "Date" field in them, so I can add a filter to modify the date range. But in other reports, there isn't any field about date. So how can I control the date range of the reports without date field?Thanks.


    Juliet
    Juliet

    Good Monday morning and welcome to the QReportBuilder messageboard.

    Are you using a filter with a variable and which report do you need a date filter for and can't find the date field?

    Please post an example of the filter that you are now using.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.
    "Make it as simple as possible, but not simpler."
    Albert Einstein

    http://www.iadn.com/images/media/iadn_member.png

    Comment


      #3
      Re: About Date Range Filter

      Hi,
      I want to create report Income by Customer Summary, there are only four default fields in this report, they are: Amount_count, Amount_1,Label and Text. Indeed when I create this sample report, I can select columns that I need except the default ones but there is still no date field.
      I didn't create create the filter using variables, when I tried to create this report using qbreport_incomebycustomersummary_set.set, I can define connection,select columns and then specify report filter. I can specify the value of the "DateFrom" and the "DateTo" filter parameters and then press the button "Finish" to finish creating this report. But after that, I don't know how to modify the date range filter...
      Any ideas? Thanks.

      Comment


        #4
        Re: About Date Range Filter

        Originally posted by Juliet View Post
        Hi,
        I want to create report Income by Customer Summary, there are only four default fields in this report, they are: Amount_count, Amount_1,Label and Text. Indeed when I create this sample report, I can select columns that I need except the default ones but there is still no date field.
        The date is not listed as an output item, because the report is a summary by customer, so there is not a detail report line to display the date with.
        Originally posted by Juliet View Post
        I didn't create create the filter using variables, when I tried to create this report using qbreport_incomebycustomersummary_set.set, I can define connection,select columns and then specify report filter. I can specify the value of the "DateFrom" and the "DateTo" filter parameters and then press the button "Finish" to finish creating this report. But after that, I don't know how to modify the date range filter...
        Any ideas? Thanks.
        The DateFrom and DateTo are available in the parameter area as a filter, but it is a little tricker to get the date to be easily modified....

        The easy way is to always want the yeartodate value and then use this SQL:
        Code:
        [FONT=Arial,Helvetica,Geneva,Swiss,SunSans-Regular][SIZE=-1]sp_report IncomeByCustomerSummary show Amount_Title, Text, Label, Amount parameters DateMacro = 'ThisYearToDate', SummarizeColumnsBy = 'TotalOnly'[/SIZE][/FONT]
        OR... the harder way...
        Since the system doesn't allow for a variable/argument to be linked to the filter in the sp_report statement, we have to take one step back and use the DAO Import routine to set the SQL statement with variables and then insert the variables into the SQL statement..

        More advanced coding..

        Code:
        vcQBCompanyFile= "<YourCompanyFileName>"
        
        dim connectionString as c 
        connectionString = "{A5API=QuickBooks,FileName='"+alltrim(vcQBCompanyFile)+"',UserName='QRB'}" 
        
        delete options 
        dim options as p 
        options.ConsolidateArguments= .f.
        options.AddTablesToDatabase= .t.
        options.ShowProgress= .f.
        options.AllowCancel= .f.
        
        
        delete a_import
        dim a_import[0] as p 
        SQLSelectStatement = <<%sql%
        sp_report IncomeByCustomerSummary show Amount_Title, Text, Label, 
        Amount parameters DateTo = :argDateTo, DateFrom = :argDateFrom, SummarizeColumnsBy = 'TotalOnly'
        %sql%
        
        dim vdDateFrom as D
        vdDateFrom={01/01/2009}
        dim vdDateTo as D
        vdDateTo={08/17/2009}
        
        dim args as sql::arguments
        
        args.add("argDateTo",vdDateTo)
        args.add("argDateFrom",vdDateFrom)
        
        a_import[].ObjectName = "SPReports"
        a_import[..].SQLSelectStatement = replace_arguments_in_string(SQLSelectStatement,args)
        a_import[..].SQLType = "Stored Procedure"
        a_import[..].Arguments = ""
        a_import[..].ImportType = "Create passive-link table"
        a_import[..].LocalTableName = a5.get_path() + chr(92) + "Income_CustSummary" +".dbf"
        a_import[..].LocalTableFieldDef = ""
        a_import[..].OverwriteOption = "Overwrite without prompting"
        
        dim flagSilent as l
        flagSilent = .t.
        delete p 
        dim p as p 
        p = a5_AlphaDAO_Import(connectionString,a_import,options,flagSilent)
        Al Buchholz
        Bookwood Systems, LTD
        Weekly QReportBuilder Webinars Thursday 1 pm CST

        Occam's Razor - KISS
        Normalize till it hurts - De-normalize till it works.
        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
        When we triage a problem it is much easier to read sample systems than to read a mind.
        "Make it as simple as possible, but not simpler."
        Albert Einstein

        http://www.iadn.com/images/media/iadn_member.png

        Comment


          #5
          Re: About Date Range Filter

          Al - Would you mind taking a look at the "more advanced" coding you posted?

          I copied/pasted it into QRB 9, with only these minor changes:

          Code:
          line 1: vcQBCompanyFile= "."  
          line 4: connectionString = "{A5API=QuickBooks,FileName='"+alltrim(vcQBCompanyFile)+"',UserName='Admin'}"
          No table was created, and I received this error message:

          11015 - '[QODBC] Expected lexical element not found: {08/17/2009}
          SQL State is: 42000'

          Looking at it in the debugger, it doesn't seem like the function replace_arguments_in_string() is producing the desired result. Removing your argument substitution technique and all parameters produces a table just fine.

          Thanks.

          Comment


            #6
            Re: About Date Range Filter

            Coulda swore that was working before... this is working now..
            Code:
            vcQBCompanyFile= "."
            
            dim connectionString as c 
            connectionString = "{A5API=QuickBooks,FileName='"+alltrim(vcQBCompanyFile)+"',UserName='QRB'}" 
            debug(1)
            delete options 
            dim options as p 
            options.ConsolidateArguments= .f.
            options.AddTablesToDatabase= .t.
            options.ShowProgress= .f.
            options.AllowCancel= .f.
            
            
            delete a_import
            dim a_import[0] as p 
            SQLSelectStatement = <<%sql%
            sp_report IncomeByCustomerSummary show Amount_Title, Text, Label, 
            Amount parameters DateTo = :argDateTo, DateFrom = :argDateFrom, SummarizeColumnsBy = 'TotalOnly'
            %sql%
            
            'sp_report SalesByCustomerSummary show Amount, Label, Text Parameters DateFrom = {d'2009-01-01'}, DateTo = {d'2009-12-31'}
            dim vdDateFrom as C
            vdDateFrom="{d'2009-01-01'}"
            dim vdDateTo as C
            vdDateTo="{d'2009-12-31'}"
            
            dim args as sql::arguments
            
            args.add("argDateTo",vdDateTo)
            args.add("argDateFrom",vdDateFrom)
            
            SQL_MOD=replace_arguments_in_string(SQLSelectStatement,args)
            'REMOVE THE DOUBLE QUOTES around the dates
            SQL_MOD=strtran(SQL_MOD,"\"","")
            
            TN=a5.get_path() + chr(92) + "Income_CustSummary" +".dbf"
            
            a_import[].ObjectName = "SPReports"
            a_import[..].SQLSelectStatement = SQL_MOD
            a_import[..].SQLType = "Stored Procedure"
            a_import[..].Arguments = ""
            a_import[..].ImportType = "Create passive-link table"
            a_import[..].LocalTableName = TN
            a_import[..].LocalTableFieldDef = ""
            a_import[..].OverwriteOption = "Overwrite without prompting"
            
            dim flagSilent as l
            flagSilent = .t.
            delete p 
            dim p as p 
            p = a5_AlphaDAO_Import(connectionString,a_import,options,flagSilent)
            If you use the debugger and watch some of the variables, you can see what is happening..

            Otherwise take out the debug(1) to run silently.
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              Re: About Date Range Filter

              Thanks, Al.

              That works in both QRB 9 and Alpha 5 v 10.

              Comment


                #8
                Re: About Date Range Filter

                I am using the QB report inventory valuation summary as a basis for a simple report. As with the original poster I can set the Date filter in the parameter area but it seems I have to recreate the report each time I want a different Dateto filter. You suggested a simple solution of YearToDate - Is there one for LastMonth?

                Comment


                  #9
                  Re: About Date Range Filter

                  Originally posted by SEPANEL View Post
                  I am using the QB report inventory valuation summary as a basis for a simple report. As with the original poster I can set the Date filter in the parameter area but it seems I have to recreate the report each time I want a different Dateto filter. You suggested a simple solution of YearToDate - Is there one for LastMonth?
                  Yes there is.. You can also use the begin date and end date and click prompt when you run
                  Al Buchholz
                  Bookwood Systems, LTD
                  Weekly QReportBuilder Webinars Thursday 1 pm CST

                  Occam's Razor - KISS
                  Normalize till it hurts - De-normalize till it works.
                  Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                  When we triage a problem it is much easier to read sample systems than to read a mind.
                  "Make it as simple as possible, but not simpler."
                  Albert Einstein

                  http://www.iadn.com/images/media/iadn_member.png

                  Comment

                  Working...
                  X