mibuso.com

Microsoft Business Solutions online community
It is currently Fri May 24, 2013 2:32 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [Solved] No. Series for report
PostPosted: Tue Mar 20, 2012 3:36 am 
Offline

Joined: Fri Sep 30, 2011 7:04 pm
Posts: 298
Country: Canada (ca)
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.


Last edited by nverma on Sun Mar 25, 2012 7:06 pm, edited 1 time in total.

Top
 Profile E-mail  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 6:15 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4226
Location: New Delhi
Country: India (in)
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?

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 3:27 pm 
Offline

Joined: Fri Sep 30, 2011 7:04 pm
Posts: 298
Country: Canada (ca)
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???


Top
 Profile E-mail  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 4:15 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4226
Location: New Delhi
Country: India (in)
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...

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 4:37 pm 
Offline

Joined: Fri Sep 30, 2011 7:04 pm
Posts: 298
Country: Canada (ca)
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??


Top
 Profile E-mail  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 4:47 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4226
Location: New Delhi
Country: India (in)
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?

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 4:48 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
Quote:
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

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 5:59 pm 
Offline

Joined: Fri Sep 30, 2011 7:04 pm
Posts: 298
Country: Canada (ca)
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.


Top
 Profile E-mail  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 6:43 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
mohana_cse06 wrote:
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.


Attachments:
logtable.jpg
logtable.jpg [ 56.52 KiB | Viewed 209 times ]

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org
Top
 Profile E-mail WWW  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 7:54 pm 
Offline

Joined: Fri Sep 30, 2011 7:04 pm
Posts: 298
Country: Canada (ca)
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.

Code: Select all
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.


Top
 Profile E-mail  
 
 Post subject: Re: No. Series for report
PostPosted: Tue Mar 20, 2012 8:50 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
Are you sure about PreDataItem:

See choices:
http://msdn.microsoft.com/en-us/library/dd338596.aspx

Preview Function Details:
http://msdn.microsoft.com/en-us/library/dd301398.aspx

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Toddy Boy and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to:  
cron