I'd suggest using ZSQL statements with a MSSQL DA product. You can set the statements to require variables such as region, username, etc, which then can get passed in the SQL. I've had great success converting Seagate Crystal Reports pages to ZSQL and ZPT pages. You just copy the SQL to a ZSQL method, and use the ZPT to handle presentation. Thanks, Derek Wilson -----Original Message----- From: Goldthwaite, Joe [mailto:joe@goldthwaites.com] Sent: Tuesday, November 25, 2003 11:46 PM To: zope@zope.org Subject: [Zope] Advice Needed. Hi, Sorry to bother everyone again. I try to keep my questions to a minimum but there's just too much to Zope and Python and I'm feeling a bit overwhelmed. I also apologize for not being more specific with my questions but just I don't know enough to be more specific. The thing I'm trying to do is conceptually very simple but I can't seem to get all the pieces together. I'm trying to create an Executive Information System that puts my client's financial information online with drill down capability. I'd basically like to be able to have Zope accept a URL something like this; http:\\MyZopeServer\IncomeStatement?rgn=80 and have it generate an Income Statement routine for region 80. They have a hierarchical structure with groups, divisions, regions, areas, sales reps, etc. so the code "rgn" might be "grp" or "area". That sounds pretty simple doesn't it? I can't seem to put the pieces together. I was able to write a python module that takes the organization type and number and writes an Income Statement to a file in HTML. I got the project from The Book of Zope working but all the forms seem to be linked to DTML files. It didn't give me any examples on where to get the URL parameters from or how to just return my finished HTML to Zope. I also went through the Template Attribute Language section of The Zope Book and have kind of an understanding on how TAL templates work but I don't see where they get URL parameters from. Having been a programmer for 20 years, I'm most comfortable with programming languages like Python than with TAL or DTML. Ideally, I'd like the above URL to execute my Income Statement function and pass the org type and number. My module could then return the HTML page. The main problem I see with this approach (other than the fact that I can't figure out how to do it) is that I need to connect to the database every time. Also, the Income Statement module returns data appropriate to the SQL user name so I need to have some way to associate a Zope user with an SQL database user. I work at a Microsoft shop and am getting a log of pressure to go with IIS and .Net. There are a number of people here that have already done some similar work in the sales area. I'm in kind of a race to get something put together so I can demo it. That makes it hard because I tend to jump around a lot just trying to get things working without knowing the best approach to take. I guess that's why I've got so many pieces but no pie. So, what's the best approach to take? Should I try to do it with Page Templates and python scripts? Is that efficient? Is the product approach better? Whichever approach is best, I have a ton of questions. Too many to ask for free. I can pay for a few hours of help if anyone is available. I guess what I'd really like is a product that would translate the above URL into a call to a Python function passing in the user info, the database connection, the organization type and number. It doesn't seem like that would be too hard for someone who knows what they're doing. So far, I haven't had much success. Thanks Joe Goldthwaite _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Wilson, Derek