iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi Handy,
I have created a new project that closely matches what I am doing but can't get it to fail. Difference is the test I'm using Access and the orginal using Oracle. I don't know what to say here.
This is realy bizarre. On my page I can export to XML 3 different ways:
1. Using the "Export Grid" button on the WebGrid system tray - NO Problems, file is created
2. Using Client Side script - NO Problems, file is created
3. Using Server Side ExportGrid method - PROBLEMS, file is not created (see stack trace in an message above).
What I want to do is to create an XML file and then open a new window go to a different site and use the XML file as a data source (don't worry how the XML file gets there, these are on the same server so the XML is stored in a virtual directory and is accessible but both sites.)
I could use the Client side export, but I don't want the user to see the XML file as is the case now. Can I turn off the streaming of the export to the browser? Also how can I get the name of the export file client side?
I have tried looking at the ExportCompleted event, but to no avail.
This is driving me crazy and shouldn't be this hard...
John
This is related to the export problem I am experiencing. Since I can't get the ServerSide Export to work, what I am doing is creating a new dataTable and setting that to the WebGrid DataSource and then executing the WriteXML method of the DataTable. This work fine, but I want to remove certain columns and change some column names, but since the DataTable I created is based upon the WebGrid DataSource by Reference, if I change anything it changes it in the orginal data source. What I would like to do is to get atemporary copy of either the datasource of grid so I can make changes to the data table before exporting without affecting the original data source.
Just wondering if there was anymore on this problem? Why would the exact same code work for every type of export that is supported, except for XML. Does XML export not use the ActiveReports (I noticed there is no XML class in the ActiveReports dll) I see DataDynamics.ActiveReports.Export.HTML, PDF, TIFF, XLS, RTF, TEXT, but no XML.
I need to export from the server side to XML using the ExportGrid method and (I know it works for all the samples), is not working for me!.
I use Oracle and Custom Data Class that returns a DataTable and I set the WebGrid DataSource in the InitializeDataSource event.
"fn" is the report path. I don't the TempReports directory, we use a path that is not on the Web and is a virtual directory with all the correct permissions for reading and writing. "fname" is the name of the file, again I don't use the default filename but one that is based upon the logged in users name. I have dropped this variable and used the default name but it also fails. Below is the exact code I use in a Button Event.
Dim fn As String = "/cfxtemp/" Dim fname As String = Page.User.Identity.Name & "_Maps" Dim file As String = WebGrid1.ExportGrid(New ISNet.WebUI.WebGrid.DynARInfo("xml", Server.MapPath(fn), fname))
I agree it may be my programming but why would the exact same code work when exporting to HTML,Text,PDF, Excel, TIFF but only fail for XML?
The only thing that is different between the 2 cases where I use this code, is the one that fails doesn't use anytype of DataSource control, but rather sets the grid datasource in the InitializeDataSource event to a Custom Data Class method and the one that does work uses the ISDataSource server control.
None of your samples bind the grid this way so I can't test to see if it's my coding or the control.
As as workaround (not the best) is just to use the WriteXML method of a DataTable to create my own XML file. As I said this is not the preferred way!
Hi Handy and Glenn,
Of sourse your samples work! But mine still doesn't. I don't use a data source control (ISDataSource or ObjectDataSource) . I have a Custom Object where on the WebGrid_Initialize event I set the datasource to a function within the object. I have a button on the form which runs the following code when the user clicks on:
Dim file as stirng = WebGrid1.ExportGrid(ISNet.WebUI.WebGrid.DynARInfo("pdf",Server.MapPath(fn), "fname")
And the PDF file is created, just like your samples. But if I change the line to:
Dim file as stirng = WebGrid1.ExportGrid(ISNet.WebUI.WebGrid.DynARInfo("xml",Server.MapPath(fn), "fname")
I get the following stack trace:
[NullReferenceException: Object reference not set to an instance of an object.] ..(String fileName, Hashtable customAttribute) +385 ..(ActiveReport3 rpt, String reportFileName, Hashtable customAttribute) +561 ..() +370 ISNet.WebUI.WebGrid.WebGrid.ExportGrid(DynARInfo reportInfo) +219
Why would the exact same code work for PDF but not for XML? And the export button on the tray works.
Yudi,
Your first example of changing a column name works, although you can't add a space, like "Carrier State" the export replaces the space with "_0020_".
In the second example in changing the Text value doesn't work. You can change the Value but not the Text that gets exported.
thanks
Thanks, I will try out as soon as I can and let you know of any problems.
HI Handy,
It's not that I want to disable the scripts, it's how to handle the control if the user turned javascript off in their browser.
The sites that I am writing are for the Government and many of their users have javascript turned off. The sites must also allow any one to be able to access these sites no matter what. They may have limited functionality if the user turns off javascript but they still must be able to access the sites and be allowed to enter data.
Using the webUI controls, specifically webInput controls, if the user turns off javascript in their browser and I include the webCombo control, the user can not manually enter any data in the textbox. Of course the list wouldn't popup, that's ok, but they should be able to manually enter the data in the textbox. Now what happens the user enters the data and then clicks a button to submit the data the data is ignored.
All I am asking is to consider allowing the simple webUI controls, used for data entry, convert to a simple html control if the user has turned javascript off. For example, the webInput controls would convert to a text box and the webCombo would convert to a simple html select list.
I can reproduce this behaviour in the samples that come with webUI. Open up the VB project for WebScheduler and view the page "DataEditing.aspx" in the browser. Go to the month of Sept 2009, and add an event using the detail. Click on the StartDate drop down and selects todays date. Notice the End Date change to 2008. Svae the event and try to edit it, notice the Subject is read-only. Click on the All-Day event checkbox twice and notice the subject line is now writable. Also notice that the message event is in the past is displayed.
Refresh the page and then Go to Oct 2009 and try to create a new event, notice subject is read-only. Click on All day event and the subject can now be entered. Refresh page and try to edit the event you added in October.
I'm using IE 7 in the case.
Hi James,
I was just about to also try that. Don't know whay I didnt think of that before! Thanks for the link for HttpWatch and great tool.
I'll let you know the results
UPDATE: Your solution works, thank you. Still have some problems but should be able to solve them. The webnotification fails with _iswnf_pb error, but I suspect it the same issue with the web servvice.
Again James, Thank you for your very helpful help.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname