IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Using a define to reformat a field
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
<Leah Bell>
Posted
I am filtering on two fields but am receiving an error message when I try to run the report. The error says it is a problem with the format of the fields I am filtering on.
How do I reformat the two fields?
Would you create a Define and use the edit function to do this? If so, how do you pull in the new edited field from the define into the filter?
 
Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Could you post a code example and version you are working with...? I use the Define/Edit all the time but there can be tricks especially when working with date fields.....

Maybe one of the guru's can offer assistance but some of us newbie's need more info.
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
<Leah Bell>
Posted
I am using WebFocus Developer Studio 52. I have been using report painter and the gui interface to create the report really and haven't actually been writing any code into it myself. But what I am trying to do is change the format of a date/timestamp field to the YYMD format. I was thinking that I might could change the format from the MDYY that it is in in the database to the above format using a define in the procedure pane and the edit function. I think that if I can accomplish this it will solve my problem I am having when trying to run the report with the filter on the above date. currently I am getting an error message about the format of the date in the field I am tryin to filter on. I guess I would be doing something like EDIT (<field name>, "YYMD")? I haven't been able to get it to work yet though. Also, once it is reformat properly do you know how to pull the defined filed into the filter. I don't see where I can pull that in in the where clause interface if it is a defined field.
 
Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
Try using HDATE or HPART.

field2/SDfmt = HDATE (DTfield, format);
field2/Afmt = HPART (DTfield, 'unit', format);

I like HDATE the best because it needs less input values.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
Could you please show us the the exact filtering statements and the formats of the fields you are filtering on? You may not need to change the format of the fields you are testing.

Let us know.
 
Posts: 342 | Location: Melbourne Australia | Registered: April 15, 2003Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Using a define to reformat a field

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.