matt cushing
 New Member
 Posts:5

 |
| 17 Apr 2006 03:08 PM |
|
If you choose to save to database, how is it saved? In XML blurbs, or does it set up a table for you?
|
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 17 Apr 2006 04:14 PM |
|
The data is saved as XML fragments to the Table C5SLLC_FormData. When the data is requested, the fragments for the date range are retrieved as a Well Formed XML document and transformed into XML which can be loaded in a Dataset.
If you are a programmer and want to use the DataSet in another module I can supply the code for that.
Steve |
|
|
|
|
matt cushing
 New Member
 Posts:5

 |
| 17 Apr 2006 04:21 PM |
|
I'm going to use this for a lot of different uses in our portal, mostly email alerts and things like that. But, if possible, I'd like to use this to allow users to submit weekly data from each of our facilities. When they are done, I'd like to run reports based on the data that has been submitted from all of our regional people. There's also the need to be able to submit expense reports from the field, and this seems to be a really good way of doing it. Allowing them to submit a form, have them check their info, and then submitting not only the form to the payroll people by email, but save the info somewhere. If I am understanding things correctly, you can do that, but instead of saving the info into a table based on forms, you're saving it in XML fragments, right?
I'm just getting up to speed on .NET, and am not familiar enough to know what to ask for. I'm assuming that parsing it into it's own table is really not the way to go. Would it be possible to run reports based on the dataset, or even just show the dataset itself? |
|
|
|
|
Jenese Briegel
 New Member
 Posts:1

 |
| 26 Apr 2006 10:49 PM |
|
If you are a programmer and want to use the DataSet in another module I can supply the code for that. Hi, I am and I do. Please give a code example for using the DataSet (that contains the date, xml, etc) elsewhere. Thank you |
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 27 Apr 2006 02:03 PM |
|
Here you go. First you must set a reference in your project to:
Code5Systems.FormMaster.dll Code5Systems.FormMaster.SqlDataProvider.dll Next is the Import:
Imports Code5Systems.FormMaster.Business
Then the Code:
Dim ds As DataSet
Dim strXmlResults As String
Dim strFormMasterPath As String
Dim objFormDataCtl As New FormDataController
'Virtual Path to the Form Master Install Folder strFormMasterPath = "DesktopModules/Code5Systems_FormMaster/"
'Get the Data as an XML string strXmlResults = objFormDataCtl.GetFormResults(753, DateTime.Parse("1/1/1970"), DateTime.Now, 1, Integer.MaxValue, True) 'Parameters: 'moduleId Integer 'dtStart DateTime 'dtEnd DateTime 'pageNum Integer' 'pageSize Integer 'fromControl Boolean (Optional default = True)
'Convert the XML String Data to a DataSet. ds = objFormDataCtl.GetDataSetFromFormResults(strXmlResults, strFormMasterPath, True) 'Parameters: 'xml String 'modulePath String 'fromControl Boolean (Optional default = True)
Me.DataGrid1.DataSource = ds
Me.DataGrid1.DataBind() |
|
|
|
|
matt cushing
 New Member
 Posts:5

 |
| 04 May 2006 08:59 PM |
|
so if I slap this code in an aspx page, and IFrame it, I should be able to see the data, correct? I'm wanting to put together a small project db/table/form whatever. I'd like to be able to add the things into the form I built and then let my manager see all of the things I am working on. |
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 10 May 2006 02:19 PM |
|
In theory Yes. I have only tried it in another .ascx page but it should work fine.
Steve |
|
|
|
|
Kelly Menzel
 New Member
 Posts:3

 |
| 27 Jul 2006 06:08 PM |
|
Hello
Is there anyway to do this without having to use 'Code5Systems.FormMaster.Data.DataProvider' ?
I think I am trying to say, can we supply a connection string to make this completely independant from dotnetnuke?
I am trying to create a user control that integrates in sharepoint. Users of our website can submit feedback forms and we want sharepoint (a separate microsoft web application) to be able to look into the c5slcc database tables and get these form results...
Using the solution above, I obtain the following exception error: The type initializer for 'Code5Systems.FormMaster.Data.DataProvider' threw an
exception.
Thanks for your feedback. Kelly
|
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 27 Jul 2006 06:34 PM |
|
The error may be cause by the fact that you are out of the DotNetNuke Environment and References to objects are missing. If you have the source version it would be pretty easy to roll your own access code in WSS.
Steve |
|
|
|
|
Kelly Menzel
 New Member
 Posts:3

 |
| 27 Jul 2006 08:05 PM |
|
unfortunately, i do not have the source. but why wouldn't something like this work?
objConn.Open();
objRdr = objCmd.ExecuteReader();
objRdr.Read();
String strXmlResults, strFormMasterPath;
FormDataController objFormData = new FormDataController();
strFormMasterPath = "";
strXmlResults = objRdr.GetString(0);
objData = objFormData.GetDataSetFromFormResults(strXmlResults, strFormMasterPath, true);
dgFormData.DataSource = objData;
dgFormData.DataBind();
I get the following error: NoDataAvailable. My logic is that I have returned a string marked up in html and that should be all I need to use GetDataSetFromFormResults(), obviously I am missing something.
I really appreciate the response I have been getting so far and Thanks for whatever you can help me out with in the future!
Kelly |
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 28 Jul 2006 01:36 PM |
|
First:strFormMasterPath is used in
oTransDoc.Load(HttpContext.Current.Server.MapPath(modulePath & "assets/xslt/FormResultsDataSet.xslt"))
So if the function is not finding the propper path to FormResultsDataSet.xslt that could be part of the problem
Second:
strXmlResults = objRdr.GetString(0); may not get all the results since the SP is usung For XML clause.
You should use
strXmlResults = ""; while (objRdr.Read()) { strXmlResults += objRdr.GetString(0); }
HTH Steve |
|
|
|
|
Kelly Menzel
 New Member
 Posts:3

 |
| 28 Jul 2006 10:33 PM |
|
#1. I've ensured that the strFormMasterPath is valid, when I have an invalid path, an error is thrown accordingly, it says something to the effect of "Could not find a part of the path..."
#2. Im using my own store proc that simply returns the formdata xml column of the c5sllc_formdata table, perhaps this is my problem, but because it is already in xml form, i do not use FOR XML. What I get returned is straight xml which I use objRdr.GetString() to get it to String form. In the example code above, I am only interested in the first record returned, I will worry about the rest later. This is why I only read the objRdr once using [if objRdr.Read()] instead of [while objRdr.Read()].
Let me know if you have any thoughts, Thanks again, Kelly |
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 28 Jul 2006 10:39 PM |
|
the Funciton does an XSLT transformation on the results to create a format which can be loaded by a DataSet. For this reason the XSLT transformation expects the Input XML in the correct schema for the transformation. This is why your code is failing. |
|
|
|
|
Reginald Thomas
 New Member
 Posts:8

 |
| 22 Aug 2006 03:57 PM |
|
Quick Question... I have just purchased Code5systems Form Master for DNN 2.1.2 because a pre-existing website is using that version of DNN. (from my initial tests... I'm finding this is a GREAT PRODUCT)
However I too need to be able to Save Data to a database or convert the xml to a SQL data table just as you are showing here:
My Questions:(If you don't mind asking and forgive me if i sound repeating to what you may have already answered)
1)Will the process you 've outlined in this post work for Form Master 2.1.2? 2)What is the SQL table name where the XML is stored?
Thanks |
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 22 Aug 2006 07:31 PM |
|
I have not looked at the code for a long time for 2.1.2, but the DNN3 version code was based on DNN2 version. The report data access method has not changed since then, so it should work. Let me know if you have issues, I will look into it.
The table name is C5SLLC_FormData
Steve |
|
|
|
|
SaintMak
 New Member
 Posts:1

 |
| 29 Mar 2007 06:36 PM |
|
Hi Steve,
with the example you gave to Matt. Could I use this same approach to show a list of vendors which will be displayed by a user clicking on an image map of the globe, selecting by region? So a user clicks on a region using a .jpg of the globe and then a list of vendors for that region is displayed. How would I pass the value for the users selection to a dataset to be displayed in a datagrid.
Sorry as you can tell I am not a programmer, just bit off more than I can chew. 
Thanks for you help. |
|
|
|
|
Steve Provencher Moderator
 Advanced Member
 Posts:681

 |
| 29 Mar 2007 07:33 PM |
|
If you can get the dataset into a Module or an Page, then a developer could use the data in anyway you wanted. Providing a solution of course is beyond the scope of support, but I could help with a specific issue a developer may have. |
|
|
|
|