i see the following squiggly
What is this indicating ? I am trying to load a dataset through this XSD and there i believe since the imports are not getting resolved this is causing me a lot of trouble ?
Also the larger problem i have is that i have a bunch XSD Schemas which i need to convert into JSON equivalent.They have dependent xsd:import statements , what would be the best way of going about this in .net.
I solved this by going into the Security tab and selecting the suggested radio button "This is a full trust application". i used the following reference
http://social.msdn.microsoft.com/forums/en-US/asmxandxml/thread/b1db5b9f-50a4-4a21-aba1-afeb30957efd
Related
I use Word.Interop reference in my solution and have no errors or warnings.
When I run the program I get this message
I have already checked in the reference properties and "Embed Interop types" property is set to false.
I found that the marked answer here helped the questioner to solve a similar problem but I DO NOT understand what I should do.
Thanks!
I found the solution to this problem following the accepted answer in this post:
Use FuseLogVw to keep track of where your program is breaking and how it is breaking. This application has a table with lots of traces. Find out where the fault application is called and see what is wrong with it.
I generate a SpreadsheetML file for MS Excel in my C# project. This worked since some changes yesterday. Now I have issues opening it. It comes up with the error:
XML PARSE ERROR: Null or missing attribute value
Error occurs at or below this element stack:
I already narrowed it down to a single table with the issue, but it has 7000+ rows with around 20 columns. When I export a single line it opens fine, so apparently not every line has the issue.
Now I'm looking for advice on how to find the issue as Excel does not provide a line number (I HATE that!).
Anybody knows a tool or good method to validate a SpreadsheetML file?
I'm trying to integrate reporting services in an C# application, but when I'm trying to compile it I'm getting a bunch of 'already contains' errors, just like those two:
error CS0101: The namespace 'Microsoft.SqlServer.ReportingServices2005' already contains a definition for 'ListSecureMethodsCompletedEventHandler'
error CS0101: The namespace 'Microsoft.SqlServer.ReportingServices2005' already contains a definition for 'GetRenderResourceCompletedEventHandler'
They all come from ReportingServices2005.cs file, which was generated using wsdl and which I included in the project. What am I doing wrong here?
I probably should also mention that I'm using ReportingService2010.cs and ReportExecution.cs.
Well, that was easy enough. It was my first time using ReportingServices in C# and I misread the documentation. I thought both ReportingService2005 and 2010 are needed. After excluding ReportingService2005 and changing a few things everything worked.
I'm building a generic survey engine where end users can generate and design their own surveys (including UI design). I'm interested in building (or perhaps even buying) a custom WinForms designer which would be able to output design in XML format. I'd then save the XML to database and when users load a survey, XML would be parsed and the form would be dynamically generated based on the XML data.
Building my own C# to XML converter is an option, but I'd like to avoid it since users would have to use Visual Studio to get ahold of WinForms code and then run a custom tool to generate XML output, which is a pretty clumsy solution (besides I can't force customers to buy VS).
I'd appreciate it if anyone could point me in the right direction.
Thanks!
The bits of the WinForms Designer are exposed by the .NET framework: Design surface, toolbox, property grids,...
This MSDN article and this CodeProject article should help you get started.
Of course, this is only the start of the story.
Your second problem is to make the designer emit XML rather than C#/VB code. Last but not least, you'll have to create the form at runtime, which is usually done by compiling the code generated by the designer. Needless to say that compiling XML is another story.
It would certainly be easier to store the C# code in your DB rather than some XML model. You can then compile it programmatically at runtime (no need to have VS installed on the client's computer. The .NET runtime is enough) and instantiate the form class dynamically. BTW, whether you complie the code in the designer or in runtime is up to you.
However, other routes may be easier, such as Hans' suggestion: InfoPath.
The Mono project has a Winforms Designer. I don't know how easy it would be to re-use as a componant. Here it is in action:
I don't know how you would go about serializing the output to XML and deserializing it again. Maybe you could even store the C# in your database?
Check this post on how to create xml files in C#: Working with XML
Then use sp_xml_preparedocument/sp_xml_removedocument in SQL to create/parse xml files (use stored procedures to do this)
Traverse and use the generated xml in your winform (I suggest you use LINQ to XML to do this)
Probably the hardest thing you'll encounter here is the creating xml part and traversing the xml nodes, but aside from that everything will be a breeze.
We're already implementing this structure/architecture at work but on webforms not winforms. But I think the flow/logic is the same. HTH.
Edit: This post might help you. Cheers.
Afternoon Developers,
I have a problem that's beginning to get on my wick. I have looked through google and Crystal Reports help and am still stuck for a solution.
We have created an XSD complete with full information about data-types and the like.
A report has been created that is linked to this XSD (using a c# class generated using Microsoft's xsd.exe SDK) and uses the field information to fill the report.
From c# we are instantiating this report and populating it with an XML file that conforms to this XSD and has been validated against it.
Now the problem is that although everything validates without errors (Crystal formulas etc) and compiles fine, when we run the application and attempt to populate the Crystal Report the Report seems to loose all knowledge of the data-typing.
Formulas such as
if ({LetProperty.lp_buildings_selected} = true) then
"Standard Cover With Accidental Damage Cover"
else
"Standard Cover";
come back with "A string is required here." error. This formula should run fine as the field referenced is a Boolean Data-Type, Crystal Reports knows this in design time.
To get it to work we have been needed to cast the field ToText and compare it to 'true'.
This is a simple work around but we will be creating many reports and don't want to twist code that should work into 'Fudged' messy code that will work.
Can anybody tell me if I am missing something glaringly obvious or if there is something that we need to set as this is confusing us immensely!
Many Thanks all.
Right,
I just wanted to let anyone know how we solved this if anyone ever gets stuck in the same situation.
What we needed to do was before populating the created dataset from the Xml file (to pass to the Report) we read the Xsd into the Dataset so that it was then strong typed and contained all the Data-typing information also.
I don't know why crystal doesn't keep all the Data-Type information that was assigned to it when we created it and linked it to the Xsd but this is how we got around that.
Is LetProperty.lp_buildings_selected set to anything besides "true" or "false" in the XML document (perhaps empty string)? If so this may be the reason that Crystal Reports is trying to use it as a string.
I believe the generated XSD is probably set up by the prevent that, but thought I'd throw it out there anyway.
Is the problem just that you need to include the schema in each XML file? Doing this will have the full type information sent to Crystal as you tell it the XML file is the DataSource. I think I had a problem like you mentioned when I did not include the XSD in the header of the XML file.