Non Lawson table access by DS

 6 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
ryan
New Member
Posts: 0
New Member

 Is it possible to use a Crystal report, .csv file to use as a data source 

in Design Studio?

Can a non-Lawson table be created and set up with dbdef and access it with DS? Possibly need to do a blddbdict or bldora10ddl.

 

David Williams
Veteran Member
Posts: 1127
Veteran Member
You can access a non-Lawson table if it's defined in Lawson but not a CSV file.
David Williams
Ben Coonfield
Veteran Member
Posts: 146
Veteran Member
It would be tricky to set up, but if you are using Oracle, you might be able to use a .csv as a DS data source by defining what Oracle calls an External table. An external table looks like a regular table as far as SQL select calls are concerned, but the data is not stored in the database. Instead, every time you do a SELECT then Oracle reads a flat file -- which could be a .csv. I have used an external table which was definied somethink like this:

CREATE TABLE LAWSON.ZZINV
( "P_TYPE" CHAR(3 BYTE),
"C01" VARCHAR2(12 BYTE),
"C02" VARCHAR2(22 BYTE), )
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY "AP_INPUT"
ACCESS PARAMETERS
( RECORDS DELIMITED BY 0X'0D'
badfile AP_OUTPUT:'invoices.dat.bad'
logfile AP_OUTPUT:'invoices.dat.log'
FIELDS TERMINATED BY '|'
LRTRIM
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
)
LOCATION ( 'invoices.dat' )
)
REJECT LIMIT UNLIMITED;
ryan
New Member
Posts: 0
New Member

When i attempt to build against the created table i get this error mssg:

PROD=TEST&FILE=HREMPPDO&INDEX=PDOSET1&FIELD=EMPLOYEE;CHECKDATE;ACCRUALRATE;ELIGBALANCE&SELECT=EMPLOYEE=100123&OUT=CSV&DELIM=~

at com.lawson.ios.dig.db.DigObject.getDbFile(DigObject.java:698)

at com.lawson.ios.dig.db.DigObject.executeInternalRequest(DigObject.java:234)

at com.lawson.ios.dig.db.DigObject.executeRequest(DigObject.java:173)

at com.lawson.ios.dig.db.Dme.executeRequest(Dme.java:74)

at com.lawson.ios.dig.ErpDmeAgent.processRequest(ErpDmeAgent.java:111)

at com.lawson.ios.agent.container.AgentContainerImpl$AgentWrapper.processRequest(AgentContainerImpl.java:467)

at com.lawson.ios.dig.DmeBroker.processRequest(DmeBroker.java:59)

at com.lawson.ios.agent.container.AgentContainerImpl$AgentWrapper.processRequest(AgentContainerImpl.java:467)

at com.lawson.ios.agent.container.AgentContainerImpl.processRequest(AgentContainerImpl.java:239)

at com.lawson.ios.servlet.Router.doGet(Router.java:214)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)

at com.lawson.servlet.TransformFilter.doFilter(TransformFilter.java:126)

at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)

at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)

at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)

at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)

at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)

at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)

at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)

at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)

at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)

at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)

at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)

at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)

at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)

at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)

at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)

at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)

at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

]]>

John Henley
Posts: 3355
Does rngdbdump work for the server?
Thanks for using the LawsonGuru.com forums!
John
Deleted User
New Member
Posts: 0
New Member
Another possibility is to put the file in the persistdata directory and use the FileMgr servlet to read it in Design Studio.
ryan
New Member
Posts: 0
New Member

We ended up working out this solution: DBA setup a view from a csv file that is refreshed nightly and I created a portal page based off the new table.  Thanks for your suggestions