No. Series for report

nvermanverma Member Posts: 396
Hey yall,

I want the Receipt No. in a report to increment by itself every time a report is run (The first time the report run, the Receipt No. should be 1. The second time, it should be 2 and so on). Therefore, I created a No. Series (called CLERP) to keep track of the Receipt No.

I went to Administration => Application Setup => Financial Management => Sales & Receivables Setup => Numbering => ( I am not sure about this step) Order No. => CLERP.

I am not sure what to do next. How do I assign this Order No. (CLERP - No. series) to the Receipt No. field I created in the report, so that it will increment by itself.

Any Help will be greatly appreciated.

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    so you mean CLERP no.series is already assigned to Order No.'s in Sale & Receivables setup?

    And you want the same no.series to be incremented in report for receipt No?
  • nvermanverma Member Posts: 396
    Yup. I created CLERP so I can used it to increment Receipt No.

    I am not sure what to do next. After I assigned it to Order No.

    How do I set it up so the recepit No. uses this CLERP to increment???
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Why do you want to assign it in Sales & Receivalbles setup?

    If you want to do so then create a new field and do it but dont use existing fields like Order No..etc...

    Check how Sales Order No. are incremented...
  • nvermanverma Member Posts: 396
    I am not really sure why it would be in Sales & Receivalbles setup. But my manager told me that is where it would be assigned.

    Even if I create a new text and lable in that card. How will I assign the Receipt No. to this new field I will create??
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    nverma wrote:
    Even if I create a new text and lable in that card. How will I assign the Receipt No. to this new field I will create??
    Did you check how orders and invoices working with No.Series?
  • SavatageSavatage Member Posts: 7,142
    I want the Receipt No. in a report to increment by itself every time a report is run (The first time the report run, the Receipt No. should be 1. The second time, it should be 2 and so on). Therefore, I created a No. Series (called CLERP) to keep track of the Receipt No

    The confusing part is when you say Reciept No.
    It sounds more like a Print No. by your description.

    Is that all you are trying to do is figure out how many times a report has been printed?

    Or would you rather log the reports being printed as seen here:
    http://blogs.msdn.com/b/nav/archive/201 ... usage.aspx
  • nvermanverma Member Posts: 396
    Its not even printed. It is how many times the report ran. The first time when the user runs the report the receipt No. is 1. The next time the user opens the report (runs it), the receipt no. should be 2 and when its open the 3rd time. The receipt no. should be 3 and so on.
  • SavatageSavatage Member Posts: 7,142
    Did you check how orders and invoices working with No.Series?

    Check the sales header table. Search for Testnoseries for a bunch of examples

    & do you want to use NoSeriesManagement CU396.

    So you want to just save a value in the sales & rec setup table?
    What just not make an integer field in sales setup

    OnPreReport()
    salesetup.GET;
    salesetup.RunNo := salesetup.RunNo +1;
    salesetup.MODIFY;

    if multiple reports you want to keep track of create a new table (which i prefer).

    I'm just trying to figure out the use other than trying to find which reports are being run and which are not. What's the main goal?
    what are you trying to achieve and how will it be used?
    Why does it matter?
    As the post above - at least that logged the user, day & time in a seperate table. Then you can use that table to run reports about reports.
  • nvermanverma Member Posts: 396
    I have been thinking about this. I am not sure if this would work. Why dont we try to use CurrReport.Preview function. I can use this to keep track of how many times my report has been printed in the database.

    First time around, I will set my "ReceiptNo." to 1. If it is printed. I will Increment my "ReceiptNo." variable for next time. If it is not printed, the ReceiptNo. will stay the same.
    This is the code I came up with, but something doesnt feel right about it (this is written in OnPreDateItem trigger). 
    "ReceiptNo." :=1;
    
    IF CurrReport.PREVIEW THEN
    "ReceiptNo." := "ReceiptNo."
    ELSE
    "ReceiptNo." := "ReceiptNo." + 1;
    
    


    Actually, I have been doing some research about the preview function and this wont work.
Sign In or Register to comment.