Selecting particular record and transfering information.

nvermanverma Member Posts: 396
Hello,

I am working on a report that needs a a particular functionality that I am not sure how to implement.

The user should be able to select any number of "Customer Ledger Entires" in a form. At the botton of the form there is a button called Print. When the user clicks that button. Certain information from the selected entries automatically gets inserted into a particular section in a report.

How can I do this? Is there a particular filter that I could use that detects the records that are selected??

Comments

  • SavatageSavatage Member Posts: 7,142
    If you don't have a developers license I think it will be nearly impossible for you.
    You will have to code some function on a button to pass it to a reports, which can't be done without the proper license.

    Who's asking you to do this when you appear to be limited on what you should be attempting at this stage in your Nav life?
  • SavatageSavatage Member Posts: 7,142
    edited 2012-03-08
    Do you even know about Marking things?

    Go to any list form - ie/Item List

    select a group of lines by clicking & holding on theleft of the screen
    Once highlighted. click Ctrl-F1 (You should see markers next to those lines now.)

    If you go to the top & Click View->Marked Only those lines should only show.
  • nvermanverma Member Posts: 396
    The company I work for has a developer license.

    I am just not sure how to go about doing it.

    I have been working with NAV for few months only and I have never done anything like this. Someone else had a similar question, but i read the replies that people posted on his questions. But it sorta just seems jibrish to me. Thats why I wanted a step by step guide as how to go about doing it since I am very lost.
  • SavatageSavatage Member Posts: 7,142
    I think you make me nervous because from the other post you said,
    "I worked on Fixed Assets for our client. I added the functionality they were looking for and released it. While they were testing, they found an error."

    and by reading the posts it feels like you're learning as your going instead of being traind first. and this can be dangerous if you start messing with code. IMHO

    Is there no one at your company you can ask for help from?

    In other posts I believe I have pointed out the Application Deginers Guide 8 C/Side Ref Guide.
    http://msdn.microsoft.com/en-us/library/dd301468.aspx
  • nvermanverma Member Posts: 396
    My manager is of the opinion that, the best way to learn something is by practicing and trial and error.

    If you are spoon feed all the time with the correct answer, you will never really learn and grown.

    He does help me if I spend like 5-6 hrs trying to figure out an error and I cant...then he would point me in the right direction. He just gave me this task and thats why I wanted to give it a shot before I give up and ask him for help.
  • SavatageSavatage Member Posts: 7,142
    nverma wrote:
    If you are spoon feed all the time with the correct answer, you will never really learn and grown.
    Being spoon fed is far different from being thrown a tack you have no clue on even how to start approching it.

    Try to follow that post that you didn't understand. Any keyword in code that you don't understand - then look it up in c/side ref guide.

    It's also funny that they won't spoon feed you , but that's exactly what you are looking for from the forum.
  • nvermanverma Member Posts: 396
    I will try a little harder, I suppose. :)
  • SavatageSavatage Member Posts: 7,142
    Anyway did you read the post above about marking?
    Perhaps SETSELECTIONFILTER would make more sence.
    http://msdn.microsoft.com/en-us/library/dd354931.aspx
  • nvermanverma Member Posts: 396
    I am currently trying to automatically mark the fields user has selected using the setselectionfilter when they push a particular button.

    After that is done, I will go back to the other post and try to figure out my next step.
  • DenSterDenSter Member Posts: 8,305
    There's already a button to automatically mark records. It's called "Toggle Mark" under the Edit menu. It makes no sense to provide standard functionality in a different custom button. Is your manager giving you trick requirements to work on?
  • David_SingletonDavid_Singleton Member Posts: 5,479
    nverma wrote:
    My manager is of the opinion that, the best way to learn something is by practicing and trial and error.

    Did he ever teach parachute jumping?
    David Singleton
  • nvermanverma Member Posts: 396
    nverma wrote:
    My manager is of the opinion that, the best way to learn something is by practicing and trial and error.

    Did he ever teach parachute jumping?

    lol...
  • nvermanverma Member Posts: 396
    Hi guyz,

    I have made some progress with this tasks. But I am having a newbie issue with it.

    Lets says I select 3-4 different types of Customer Ledger Entries to copy information from. In my report, it show shows the last record and it shows it over and over again.

    Any idea what I might have done wrong and how I can go about fixing it?
    This is the code I have in my form. 
    Problem 1) REC variable in SETSELECTIONFILTER will only select one record. How can I make it select multiple records??? 
    CurrForm.SETSELECTIONFILTER(Rec);
    CLEAR("Cust. Ledger Entry Receipts");
    IF Rec."Document Type" = Rec."Document Type"::Invoice THEN
    BEGIN
      "Cust. Ledger Entry Receipts".InvoiceParameters(Description,Amount);
      "Cust. Ledger Entry Receipts".RUNMODAL;
    END;
    

    This the code in my report for the following function InvoiceParameters
    DescriptionR := Description;
    AmountR := Amount;
    

    How can I make it go through every single entry rather than one entry??
Sign In or Register to comment.