mibuso.com

Microsoft Business Solutions online community
It is currently Sun May 19, 2013 12:09 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 5:23 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
Hi Masters,

I confuse of my problem. Here, a task from user. They need report for transfer shipment. But usually when enter/input for this table they didn't use item no but user search description (by using search description they could get the item no/part no). The problem is, there is 1 record that have multiply input but only have 1 item no/part no (others are comment only), but on report shown 4 part no which is the part no of 1st then loop to 2nd and 3rd line. How I delete or make it not loop for 2nd and 3rd line?

I hope all of you can understand what I mean.
Please and thanks


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 6:24 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4224
Location: New Delhi
Country: India (in)
If it is donr through code then you can find
Code: Select all
IF xxx.FINDSET THEN
  REPEAT
  UNTIL xxx.NEXT = 0;


If you need only first record then use
Code: Select all
IF xxx.FINDFIRST THEN

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


Top
 Profile  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 8:02 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
Thanks for your replying.

I will try it. I have to modified last report from other consultant, i try if it is could or not (that's the prob)


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 9:45 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5315
Location: Prague
Country: Czech Republic (cz)
The correct solution is to teach your users how to search and filter correctly. You should never think of CODE as a substitute for training. Once you start down this path they will want everything modified to their way of working instead of learning Navision.

I bet this conversation starte with the users saying "Yeah but in our old system..." That is called the road to hell.

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 10:24 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
Mr David,

Yeah you are correct. But, we can't avoid user habit. From the beginning they always search description rather than input part no or item no. Then use other comment on the next line. When I see table Transfer Shipment Line, that I found and realize why it loop. But until now can't solve. 1st Consultant who fix it before has resigned and now i confuse about his code.

onaftergetrecord()
PostedDocDim2.SETRANGE("Table ID",DATABASE::"Transfer Shipment Line");
PostedDocDim2.SETRANGE("Document No.","Transfer Shipment Line"."Document No.");
PostedDocDim2.SETRANGE("Line No.","Transfer Shipment Line"."Line No.");

//this part I guess for looping
vUnitPrice := 0;
vTotalAmt := 0;

IF vItem.GET("Transfer Shipment Line"."Item No.") THEN BEGIN
vUnitPrice := vItem."Unit Price";
vPartNo := vItem."Search Description";
// even user input just a comment and no part no, on the report still shown looping and take the 1st part no and on the description there's //show the comment
END;

vTotalAmt := vUnitPrice * "Transfer Shipment Line".Quantity;


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 10:50 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
I tried Mohanna code, but I can't change anything on this. When I compile, always shown error

Error while validating RDL content:
The value expression for textbox 'Transfer_Shipment_Line_Item_No_Caption' refers to field 'Transfer_Shipment_Line_Item_No_Caption'. Report item expression can only refer to field with in the current data set scoop on, if inside an aggregate, the specified data set scoop.

anyone know what the error mean?


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 10:55 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4224
Location: New Delhi
Country: India (in)
maya-chan wrote:
I tried Mohanna code, but I can't change anything on this. When I compile, always shown error

Error while validating RDL content:
The value expression for textbox 'Transfer_Shipment_Line_Item_No_Caption' refers to field 'Transfer_Shipment_Line_Item_No_Caption'. Report item expression can only refer to field with in the current data set scoop on, if inside an aggregate, the specified data set scoop.

anyone know what the error mean?


Did you delete any field in classic sections and forget to delete in rdlc data (related to RTC report)?

Error message is completely different..not related to code which I suggested..

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


Top
 Profile  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 11:01 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
Did you delete any field in classic sections and forget to delete in rdlc data (related to RTC report)?

Error message is completely different..not related to code which I suggested..[/quote]


No. I didn't do anything with the table (deleted field or anything). Only with report. I see that code and wanna modify, but can't even just put enter. When compile shown that error.


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 11:07 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
Oke, just assume the person who 1st modify this report do deleted field. So, where should I must go to check weather it has been delete or not on RDLC data?


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 11:08 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4224
Location: New Delhi
Country: India (in)
maya-chan wrote:
No. I didn't do anything with the table (deleted field or anything). Only with report. I see that code and wanna modify, but can't even just put enter. When compile shown that error.

I didnt mean table..

I mean in sections of report..

If you didnt then the problem should be exising before also..

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


Top
 Profile  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 11:19 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
I am not sure about it. It could be, because I get it from other consultant before. If we have deleted like u said, what should I do then?


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 11:26 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4224
Location: New Delhi
Country: India (in)
You have to identify the field and add it in classic sections of report or delete the field in rdlc report..

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


Top
 Profile  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 11:40 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
Oke I try.

Thanks


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 11:53 am 
Offline

Joined: Wed May 16, 2012 11:03 am
Posts: 41
Country: Indonesia (id)
I have restore the database with the last object before modify that report.
It's same, I can't modify with same error. But I can run it same like before the looping show.
I don't know how to go to RDLC report and delete what mention on the error message. Can you explain the step for me?

Sorry if it is bother you

Thanks


Top
 Profile E-mail  
 
 Post subject: Re: don't know hot to delete loop record
PostPosted: Wed Jun 13, 2012 12:02 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5315
Location: Prague
Country: Czech Republic (cz)
maya-chan wrote:
Mr David,

Yeah you are correct. But, we can't avoid user habit.


Yes you can, its called training.

It's their job that they are paid to do.

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 9 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: