Results 1 to 12 of 12

Thread: [RESOLVED] Crystal XI Parameter default value question

  1. #1

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Resolved [RESOLVED] Crystal XI Parameter default value question

    Hi Guys,

    I am adding a default value for a parameter like this in my vb code:

    Code:
    oReport.EnableParameterPrompting = True
    
    oReport.ParameterFields.GetItemByName("Initials").SetNthDefaultValue 1, "nr"
    This add nr to a combobox on the parameter prompt form that comes up in crystal. Proble is, that the first item in the combobox is ...

    How can I make the first item the default value.

    please help

  2. #2
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: Crystal XI Parameter default value question

    what is the default value?

  3. #3

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Crystal XI Parameter default value question

    I want it to be "nr"

  4. #4
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: Crystal XI Parameter default value question

    I meant this
    that the first item in the combobox is ...

  5. #5

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Crystal XI Parameter default value question

    yeah it is those dots. I think Crystal adds it automatically.

  6. #6
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: Crystal XI Parameter default value question

    I've not seen it. Anyway while designing the parameter you have in the Options section Default Value why don't you use it?

  7. #7

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Crystal XI Parameter default value question

    Because I want to retrieve a value from my database and then make it the default value. sorry, i know I mention I wanted the default to be "nr". my mistake.

  8. #8
    Hyperactive Member
    Join Date
    Jul 2007
    Posts
    479

    Re: Crystal XI Parameter default value question

    I've noticed this also with XI and it is really annoying. Doesn't matter if you set defaults in the report as I am doing, it shows the same ellipses. If you do find an answer to this I'd like to know also. I never get any answers on the Business Objects website.

  9. #9
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: Crystal XI Parameter default value question

    Because I want to retrieve a value from my database and then make it the default value.
    then have some control (textbox, DTP, Inputbox etc) from vb itself to receive the value from the user, if no value is given have your program to receive the value you had already retrieved from db. Remove that Enable prompt. I believe that is for asking info from CR itself, not for external program.
    Code:
    If len(trim(me.Text1.Text))< 0 then
      'your default value
    else
      'value from you textbox
    end If

  10. #10

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Crystal XI Parameter default value question

    rasinc is right. It is extremely difficult to get a response on the Business objects website.

    Let me explain in more detail.

    The client wants to do the following:

    I have a follow up date field and an initial field on my report. those are just 2 of the many I have. The user wants it so that when she clicks a print button then she must be prompted to clear the followupdate or add an initial. I have a parameter field inmy report with values of yes or no for clearing follow up date. that worked great.But now she wants to add an initial to the report. and these field must show on the report once printed. I had the followupdate working. Is they say yes when prompted the report suppresses the followupdate field.

    Now with the initials I want the default value to be the last initial entered for that file. they can either choose that from a dropdown when prompted or type in another 1. The report will print with the initial selected and I will run an update query also to update that initial field in the table.

    Now the problem with crystal is that those elipses are the 1st item in the combobox even if I add a default value for the parameter. and also if I type a value in the prompt textbox and then select the default value from the prompt combobox it doesn't change the value in the textbox.

    I got so sick of it I just created a form with a combobox and a textbox and then I aassign those values to the parameters for the report.

    Can anyone tell me how to do it in Crystal though. I'd love to know

  11. #11
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: Crystal XI Parameter default value question

    I got so sick of it I just created a form with a combobox and a textbox and then I aassign those values to the parameters for the report.
    you did the right thing.
    Since you are worknig from VB you could handle many elements of CR from vb itself, however if you pass the control to CR then CR takes over your program and you are servile to it. Set all the reqd parameters, SQLs, values from vb itself.

  12. #12

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Crystal XI Parameter default value question

    Thanks for the advice VBFNewcomer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width