CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge -> Tips & Solutions

 Part1: XML, AJAX, Office Web Components (OWC) tips and tricks

Print topic Send  topic

Author Message
Mango_Lier


Posts: 110
Posted: 02/02/2007, 3:26 PM

CCS is a very versatile tool to do all sorts of creative things. The well thought out design patterns can be used to build all kind of solutions. Although it is not obvious when you first evaluate the tool, it can be used to build secure “data islands” (sort of a web service) to create middle tier for the application.

I will publish a series of tips to show how CCS can be used to interface with office web components (OWC) to have charts and graphs for your application. I will also cover how to build Ajax enabled front end using bindows and dojo toolkit. Using the same backend, I will show how to interface with Adobe Flex (Ajax) toolkit.

All examples will be in ASP using the intranet database that comes with CCS. I am pretty sure that my examples can be ported to other CCS supported languages. I don’t have access to any public servers so no working examples but if you want the code, feel free to send a PM.

In this part I will cover how to create a secure data island using CCS generated ASP code and how to interface it to office web components (OWC).

Data island info: http://www.w3schools.com/xml/xml_data_island.asp
OWC Info: http://www.4guysfromrolla.com/webtech/022101-1.shtml
OWC download: http://www.microsoft.com/downloads/details.aspx?FamilyI...&displaylang=EN

You need to have OWC installed on the client machine, if you have MS office installed on your machine then you have the OWC installed, if not, then download the OWC from the link above and install it. To fully exploit the OWC features, you will have to understand the OWC object model. The help file in the OWC package has a lot of info.

The goal is to use CCS as much as we can to create and maintain the data island and not do extensive surgery on the generate code.

With that said, here we go….

1) Start CCS and create new project – this will start the project wizard
2) Highlight “Application Builder” Project Name: “OWCTest”, Language: ASP 3.0 with Templates
3) At this point you have the project and the “Application builder wizard will start”
4) Wizard Step1: Adjust your paths to the correct IIS folder and URL.
5) Wizard Step2: Select CCS installed “Intranet database”
6) Wizard Step3: check “use single keyword field for search” and leave the other boxes with the default values
7) 4: Check the “use authentication” and click next
8) 5: Add “customers” table to the left list box
9) 6: uncheck the search, record and updateable check boxes and check grid box for the customers table
10) 7: is unimportant, leave the default settings and click next
11) 8: Select your favorite color scheme and click next
12) 9: Finish the wizard and let CCS generate the page for you.

At this point you should have the “customers_list” file in you project explorer window


13) Go to main menu and create a new page. Select blank page and name it “dataislandXML”.
14) With the page open in the editor, go to “Properties” panel (lower right hand corner) and click on “restricted” property and modify the permissions so only Admin has access rights to it. Save.

15) From the “Tools” window (upper right hand corner) start the Grid Builder. This will bring up the grid builder wizard

16) Wizard step 1: no changes, click next
17) Wizard step 2: click “build query”. This brings up the VQB
18) select “customers”, “orders”, “products”, and “order_items” tables
19) select “customer_name” from customers table
20) select “order_date” from orders table
21) select “quantity” from the order_items table
22) select “product_name” and “price” from products table
23) In VQB bottom panel, change the aliases to “Customers”, “Order Date”, “Product”, “Quantity” and “Unit Price”
24) Click OK and the Grid builder wizard window will be there in step two.
25) Select all columns for display and click Next
26) we are not going to build a search so click next
27) click next to finish step 4 of the wizard
28) The form name in the explorer window will be something like “customers_order_items_ord”, let’s rename it to MyXmlData
29) Press “Shift+F10” to view the page in browser. It will bringup the login dialog enter admin/admin to view the page.

Just in case you get a Jet Database error, that means your permissions on the folder where the “Intranet.mdb” are not correct. Make sure the user “IUSR_machinename” have read/write access to it.

Open the “customer_list” from the project explorer and delete the “customers” form from the project explorer.

This is all the ground work we need to setup our project for OWC integration.

So far no new code or tricks have been applied. In the next part we will add our modifications.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.