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 Preview Blank every other time

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

    Report Preview Blank every other time

    No matter what I do, This report prints a blank every other time I print it. I can pick the same paramaters each time and it prints it blank as if there were no records. It dims the Fields at the start of it running each time - so there has to be something else i am missing.

    DIM SHARED v_Project as C
    DIM Shared v_Proj_no as C
    DIM SHARED v_Lessor as C
    DIM Shared V_Vert_Pugh as L
    DIM Shared v_Horiz_Pugh as L
    DIM Shared v_Cont_Drill as L
    dim SHARED V_Exp_Datefrom as D
    dim shared v_Exp_dateto as D
    dim shared v_Option_to as D
    dim shared v_Option_expFrom as D


    DIM SHARED varC_result as C
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    DIM v_Proj_no_rl_def_orig as C
    v_Proj_no_rl_def_orig = "kl=project,{keylist_build(\"H=.05,1:40[Project]\",''+Proj_no,left(''+Project,40))}{Project >= [varC->v_Project]}"
    DIM v_Proj_no_rl_def as C
    v_Proj_no_rl_def = replace_parameters(v_Proj_no_rl_def_orig,local_variables())
    varC_result = ui_dlg_box("Select Filters For Pugh Report-Leave Blank to Select All",<<%dlg%
    {region}
    Proejct:| [.40v_Project!v_Project_changed];
    | [%@v_Proj_no_rl_def%.40,5v_Proj_no];
    Lessor Name or Part of Name:| [.40v_Lessor];
    Vertical Pugh?: Yes Only | (40V_Vert_Pugh);
    Horizontal_Pugh: Yes Only| (40v_Horiz_Pugh);
    Continous Drilling?:Yes Only| (40v_Cont_Drill);
    Expiration Date From:| [%DATE;P=popup.calendar(dtoc(V_Exp_Datefrom));I=popup.calendar%.15V_Exp_Datefrom!V_Exp_Datefrom_*];
    Expiration Date To:| [%DATE;P=popup.calendar(dtoc(v_Exp_Dateto));I=popup.calendar%.15v_Exp_Dateto!v_Exp_Dateto_*];
    Option Expiration From:| [%DATE;P=popup.calendar(dtoc(v_Option_expFrom));I=popup.calendar%.15v_Option_expFrom!v_Option_expfrom_*];
    Option Expiration To:| [%DATE;P=popup.calendar(dtoc(v_Option_To));I=popup.calendar%.15v_Option_to!v_Option_to_*];
    {endregion};
    {line=1,0};
    {region}
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%,<<%code%
    If a_dlg_button = "v_Project_changed" then
    v_Proj_no_rl_def = replace_parameters(v_Proj_no_rl_def_orig,local_variables())
    a_dlg_button = ""
    end if

    if left(a_dlg_button,15) = "V_Exp_Datefrom_" then
    if a_dlg_button = "V_Exp_Datefrom_killfocus" then
    V_Exp_Datefrom = ctod(dtoc(V_Exp_Datefrom))
    end if
    a_dlg_button = ""
    end if

    if left(a_dlg_button,13) = "v_Exp_Dateto_" then
    if a_dlg_button = "v_Exp_Dateto_killfocus" then
    v_Exp_Dateto = ctod(dtoc(v_Exp_Dateto))
    end if
    a_dlg_button = ""
    end if

    if left(a_dlg_button,12) = "v_Option_To_" then
    if a_dlg_button = "v_Option_To_killfocus" then
    v_Option_To = ctod(dtoc(v_Option_To))
    end if
    a_dlg_button = ""
    end if

    if left(a_dlg_button,17) = "v_Option_expFrom_" then
    if a_dlg_button = "v_Option_expFrom_killfocus" then
    v_Option_expFrom = ctod(dtoc(v_Option_expFrom))
    end if
    a_dlg_button = ""

    end if
    %code%)
    dim global v_horiz as C
    dim global v_Vert as C
    dim global v_Cont as C
    v_Horiz = If(v_Horiz_Pugh=.t.,"YES","")
    v_Vert = if (V_Vert_Pugh=.t.,"YES","")
    v_Cont = if(v_Cont_Drill=.t.,"YES","")
    dim global v_EDateFrom as D
    dim global V_EDateTo as D
    dim global v_Edate_optFrom as D
    dim Global V_Edate_OptTo as D
    v_EDateFrom = if(V_Exp_Datefrom={//},{01/01/1990},V_Exp_Datefrom)
    v_EDateTo = If(v_Exp_dateto={/ / },{12/31/2100},v_Exp_dateto)
    v_Edate_optFrom = if(v_Option_expFrom={//},{01/01/1990},v_Option_expFrom)
    V_Edate_OptTo = if(V_Edate_OptTo={//},{12/31/2100},v_Option_to)

    'Conditional code follows. Executes only if the condition expression is True.
    IF a5_eval_expression("=Var->varC_result=\"OK\"") THEN
    'Print a report, label, letter, form or browse layout. You can specify which records to print.

    query.filter="(Proj_no = val(Var->v_Proj_no) ).and.((lease_Info->Lease_Expires>= var->V_EDatefrom ).and. (lease_Info->Lease_Expires<= var->V_EDateTo )).and.((lease_Info->Option_exp_date>= var->V_EDate_Optfrom ).and. (lease_Info->Option_exp_date<= var->V_EDate_OptTo )) .and. (if(v_Vert='',(lease_provision->PU_Vert_Sev =v_Vert.or.lease_provision->PU_Vert_Sev<>v_Vert),lease_provision->PU_Vert_Sev=\"Yes\")).and. (if(v_Horiz='',(lease_provision->PU_Depth_Sev =v_Horiz.or.lease_provision->PU_Depth_Sev<>v_Horiz),lease_provision->PU_Depth_Sev=\"Yes\")).and. (if(v_Cont='',(lease_provision->OP_Cont =v_Cont.or.lease_provision->OP_Cont<>v_CONT),lease_provision->OP_Cont=\"Yes\"))"


    query.order = "recno()"
    'replace variables in the filter with their actual values
    query.filter = convert_expression(query.filter,"V")

    'Prompt user whether to print, or preview the layout. Set default to Print
    prompt_result = ui_get_print_or_preview("Preview")
    If prompt_result = "Print" then

    :Report.Print("Lease_Info_Pughtst",query.filter,query.order)


    Else if prompt_result = "Preview" then
    :Report.Preview("Lease_Info_Pughtst",query.filter,query.order)

    End if
    END IF

    #2
    Re: Report Preview Blank every other time

    Hi Leah,

    You will need to change the Bottom Margin setting for the page. It can be a bit fidderly until you get it right.

    With A4 I have to make it 1.47 to prevent the blank page. Also the other thing to remember is to set the page size before you add any fields to the layout.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Report Preview Blank every other time

      Its not every other page that is blank - its every other time I use this xbasic code that the entire report is blank

      Comment


        #4
        Re: Report Preview Blank every other time

        what happens if you preview it and not print it?

        I have to say that's some filter you have there. Is there a form that reflects the same set that the report is built on which you can filter to the same records that you are expectiing the report to contain, and judge the integrity of that filter. It sounds like there is a global variable that is not being passed and the filter is failing. I would evaluate the values of the global variables and assure they have the values you expect each time you are trying to filter the set to the records that you expect in the report.
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          Re: Report Preview Blank every other time

          Originally posted by Leah View Post
          Its not every other page that is blank - its every other time I use this xbasic code that the entire report is blank
          Leah

          There is something not evaluating properly.

          Or what code is run after the report - and resets something like a variable or something else....???
          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


            #6
            Re: Report Preview Blank every other time

            That is the weird thing nothing - literally this is the entire code - if I run the first time - it prints fine - don't change anything and just re-run the script and it shows a blank page - run the 3rd time will print(or preview -doesn't matter which choice I pick)as you can see all the variables are re-set when the script is run.

            Comment


              #7
              Re: Report Preview Blank every other time

              Suggest you examine the query.filter that's being passed to the report.

              Modify the code as follows, then examine the trace window after each time you run the report, to see if there are differences when the report runs every other time.

              Code:
              query.order = "recno()"
              'replace variables in the filter with their actual values	
              query.filter = convert_expression(query.filter,"V")
              [COLOR="Red"]trace.writeln(query.filter)[/COLOR]

              Comment

              Working...
              X