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

Report Arguments at Runtime

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

    Report Arguments at Runtime

    Hi Everybody,

    In have a grid. In that grid, I have a button displays a report. That report has a start date and an end date. I want the user to be prompted for those dates at run-time.

    I viewed other threads that said to put {<Prompt at Run-time>} in the argument value. I did see that option when creating a link to a report from a tabbed UI. However, as you can see in my screenshot, that option is not automatically available in a grid object's javascript report event (see attached pic).

    argument.jpg

    So, I manually put {<Prompt at Run-time>} as the argument value in my report genie. That lets me save the report genie, but it doesn't cause a prompt when the report is displayed (and no records show up). I tried leaving the arguments blank in the genie, but when I try to save the genie I get an error that my arguments are blank and that I need to specify values for them.

    When building the report, if I leave an argument blank with no default, I'm prompted for the values. Just not when running the report, presumably because I can't let the arguments stay blank nor do I know what to do to force a prompt.

    Any help is welcome. I searched and I've been working on this all day, otherwise I would not bother you.

    PS: According to the Welcome screen, I'm using the latest release (outside of the release candidates), version 11, build 3044, system addins 4041.

    Derek

    #2
    Re: Report Arguments at Runtime

    I believe the "Prompt at Run-time" only applies to desktop applications. Are you running the grid or the report from a Tabbed UI? If you add a grid or a report to a Tabbed UI component and they have arguments defined, you should get a warning message that they need to be bound. If you launch the Tabbed UI and then click on a component or report with unbound arguments, you should see input controls at the top of the Tabbed UI where you fill in the data for the arguments. It's not the best way to get input from the user, but it gets the job done. I'm not sure if the Tabbed UI will still display input controls for your report arguments if the report is opened from a grid.

    Comment


      #3
      Re: Report Arguments at Runtime

      I suppose I can design a dialog into which users can put the starting and ending dates. There can be a button on there to fire off the reports, and I can populate the args with the values from the text boxes on the dialog. I was just hoping for a single button on a grid line, but life goes on.

      Comment


        #4
        Re: Report Arguments at Runtime

        Derek,

        You can still launch the report via a button on the grid. I’m not sure if the Tabbed UI knows to automatically display input controls for the unbound report arguments since the grid is opening the report and not the Tabbed UI. You might try it first and see if the Tabbed UI can resolve these unbound report arguments. You can also display a popup dialog after the user clicks the grid button and have complete control over the report argument values (e.g., date/time picker, validation, drop downs). I think the Tabbed UI will only display textbox controls.

        Comment


          #5
          Re: Report Arguments at Runtime

          It's 5am in California! Are you up early or really, really late?

          My report has 3 arguments, a start date, end date, and ID. The ID is linked to the grid. I can't get the report, fired off by a button from the grid, to prompt for the starting and ending date. From the Tabbed UI, the report does have fields at the top that prompt for the starting and ending dates, and a submit button. But, of course, that doesn't have the ID, so the report would not be filtered properly.

          I may upgrade to the latest pre-release version of Alpha today. I've been reading a significant amount of quirky reporting issues in the forums on the latest official build (3044). Some people are having errors, some are not, some are re-applying version patches and seeing success. I can only guess that this is a quirk, since my issues don't make any sense (to me).

          Thanks for your input. Enjoy the sunrise, unless you're up late, in which case, holy cow!

          Comment


            #6
            Re: Report Arguments at Runtime

            I'm up early. I usually get up around 3 am and begin working in my robe for about 5-6 hours and later head in to the office. I've been using a pre-release build (V11, Build 3211) for about 2 weeks and have not experienced any problems. I'm not running live yet - still in development mode, hence the long hours. I've been up for 2 1/2 hours and it's still dark outside. Good luck!

            Comment


              #7
              Re: Report Arguments at Runtime

              I just did this yesterday so I can help you out if you want. Basically, I converted my report action to text mode and then coded in a very basic JavaScript prompt for the user to enter the values. I grabbed the values into variables a and put them in my arguments. If you switch your action to text mode and have a look, you'll see where they go.

              Comment


                #8
                Re: Report Arguments at Runtime

                Thanks A H,

                I did look at text mode, and that made sense. At least, it made sense to the degree that it could, as I'm a Javascript novice (read the book, tinkered with some code).

                I think this is my relevant pre-made Javascript (the arguments for my report). For now, I added fields to my dialog for the report's starting and ending dates, since I couldn't get prompts to work. You'll see reference to those fields in the auto-code:

                ro.arguments = 'Start_Date|Time|'+{dialog.object}.getValue('STARTDATE')+'||End_Date|Time|'+{dialog.object}.getValue('ENDDATE')+'||Shopper|Numeric|'+{dialog.object}.getValue('ID')+'';

                This is where my ignorance shows: how would I construct the Javascript dialog to get the value for, say, {dialog.object}.getValue('STARTDATE') Should I put a line above that code prompting for a value, and then reference that value in place of {dialog.object}.getValue('STARTDATE') I'm not even sure if I'm moving in the right direction.

                This may quickly get out of my league, I fear. Even if I could get a prompt to pop up, it presumably wouldn't have a date-picker on it, unless Javascript-enabled browsers have that capability built-in and it could be triggered by code. There's another thing for me to research.

                Also, for those interested in the future, here's a screenshot of my current method of getting start- and ending-dates into my arguments. Basically, I used unbound fields in my dialog with date-pickers on them, which users fill out before hitting the button that creates the report.

                _report.jpg

                Thanks!

                Comment


                  #9
                  Re: Report Arguments at Runtime

                  I'm no Javascript guru either...haha. Where's Andy when you need him?

                  Here's what I did in mine.

                  Near the top, just under var rowId
                  Code:
                  var datestring = prompt('Please enter the dates between which you would like to run this report.  Seperate the dates with two dots like the default example below:','01/01/2012..01/01/2013');
                  if(datestring!=null){
                  var date1 = datestring.split('..').shift();
                  var date2 = datestring.split('..').pop();
                  }
                  I figured I'd do it this way (in one string) to use the same QBF syntax people are used to with alpha.


                  Then further down by the arguments:
                  Code:
                  ro.arguments = 'Date1|Time|'+date1+'||Date2|Time|'+date2+'';
                  I'm sure there's a better way to do this that is all fancy and stuff but this works for me...haha.

                  Comment


                    #10
                    Re: Report Arguments at Runtime

                    Thanks, that gives me a place to start.

                    Also, I did a search on Google for Javascript date-pickers, and found some cool free ones, such as jsDatePick. Their documentation looks very step-by-step simple. Theoretically, pasting a few files into your site folders, using their two lines of code to reference those files, and pasting their javascript code to create the prompts. I know you don't need this, but my users will. If someone reads this in the future, feel free to ask if I got this implemented successfully.

                    Comment


                      #11
                      Re: Report Arguments at Runtime

                      Originally posted by totallycovered View Post
                      Thanks, that gives me a place to start.

                      Also, I did a search on Google for Javascript date-pickers, and found some cool free ones, such as jsDatePick. Their documentation looks very step-by-step simple. Theoretically, pasting a few files into your site folders, using their two lines of code to reference those files, and pasting their javascript code to create the prompts. I know you don't need this, but my users will. If someone reads this in the future, feel free to ask if I got this implemented successfully.
                      I'm pretty sure you can swipe the alpha5 date/time picker code out of; say, a dialog and use that. I played around with it a bit. I'll look to see if I still have it somewhere.

                      Comment


                        #12
                        Re: Report Arguments at Runtime

                        Try making a new, blank dialog; inserting a blank control, and then pick "Control Javascript". Inside you should be able to insert a pre-defined control from the library. One of the options is a jQueryDatePicker. In there, it also tells you how to set your project properties so that jQuery will load.
                        Anyway, you should be able to use that and customize it to your own needs.
                        It ends up looking something like this when you first select it.
                        Code:
                        jQuery('#{dialog.ControlIdEscaped}').datepicker(
                            {
                                onSelect: function(dateText, inst) {
                                    $e.execute(this,'change')
                                }
                            }
                        );
                        Then you should be able to copy that out and paste it in on other components in your project and modify it.

                        You could always just make a special dialog to run your report too. It could just have the two date controls in it and you could make it look just like any other popup.

                        Comment

                        Working...
                        X