CRM 2011 Custom Chart - Two-State Field - Plot Both Values - c#

In CRM 2011 I have several records that contain a two-state (nullable boolean) field. I would like to plot a bar chart that counts the number of true and false values over all the records and plot them in the same chart (a bar for 'true' records and a bar for 'false' records).
Here is the modified XML I (originally generated using CRM) and for the life of me I can't figure out how to plot a chart with the 2 values, I have multiple records per month so the horizontal axis is the records cretedOn date (month).
Can anyone exaplin how I would modify the XML to achieve this? Or point me to a resource that explains what to do?
<visualization>
<visualizationid>{CCA96081-E319-E211-B2CA-0800273EE9D1}</visualizationid>
<name>Compliance Stages 1 & 2, Chart 1</name>
<primaryentitytypecode>intellic_suppliersalesprocess</primaryentitytypecode>
<datadescription>
<datadefinition>
<fetchcollection>
<fetch mapping="logical" aggregate="true">
<entity name="intellic_suppliersalesprocess">
<attribute alias="aggregate_column" name="intellic_csvfileimported" aggregate="count" />
<filter>
<condition attribute="intellic_csvfileimported" operator="eq" value="true" />
</filter>
<attribute alias="aggregate_column1" name="intellic_csvfileimported" aggregate="count" />
<filter>
<condition attribute="intellic_csvfileimported" operator="eq" value="false" />
</filter>
<attribute groupby="true" alias="groupby_column" dategrouping="month" name="createdon" />
</entity>
</fetch>
</fetchcollection>
<categorycollection>
<category>
<measurecollection>
<measure alias="aggregate_column" />
</measurecollection>
<measurecollection>
<measure alias="aggregate_column1" />
</measurecollection>
</category>
</categorycollection>
</datadefinition>
</datadescription>
<presentationdescription>
<Chart>
<Series>
<Series IsValueShownAsLabel="True" Color="110, 20, 78" BackGradientStyle="TopBottom" BackSecondaryColor="141, 44, 45" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40"></Series>
<Series IsValueShownAsLabel="True" Color="55, 118, 193" BackGradientStyle="TopBottom" BackSecondaryColor="41, 88, 145" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40"></Series>
</Series>
<ChartAreas>
<ChartArea BorderColor="White" BorderDashStyle="Solid">
<AxisY LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181" IntervalAutoMode="VariableCount">
<MajorGrid LineColor="239, 242, 246" />
<MajorTickMark LineColor="165, 172, 181" />
<LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
</AxisY>
<AxisX LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181" IntervalAutoMode="VariableCount">
<MajorGrid LineColor="Transparent" />
<LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
</AxisX>
</ChartArea>
</ChartAreas>
<Titles>
<Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="59, 59, 59"></Title>
</Titles>
</Chart>
</presentationdescription>
<isdefault>false</isdefault>
</visualization>
Any adivce would be much apprecited.
Jack

You need to have two series, and each needs to do an aggregate on the count of records, but for a filtered set of records according to your bit field.
So while a typical two series chart might plot number of new Accounts and number of new Leads (say) in each month, here you want to plot the same entity twice, in each case do a count, but filter the records being counted.
As a useful example to compare against, there is a built-in chart which shows Opportunities as deals won vs deals lost. In this example it does a sum of Actual Revenue for all Opportunities won, and a sum of estimated revenue for Opps lost. You can find this chart and export it, I have pasted below for ease of reference:
<visualization>
<visualizationid>{C1CB81B1-575F-DF11-AE90-00155D2E3002}</visualizationid>
<name>Deals Won vs. Deals Lost By Owner</name>
<description>Shows the amount of revenue for won deals versus lost deals.</description>
<primaryentitytypecode>opportunity</primaryentitytypecode>
<datadescription>
<datadefinition>
<fetchcollection>
<fetch mapping="logical" aggregate="true">
<entity name="opportunity">
<link-entity name="opportunity" from="opportunityid" to="opportunityid" link-type="outer">
<attribute alias="sum_lost" name="estimatedvalue" aggregate="sum"></attribute>
<filter>
<condition attribute="statecode" operator="eq" value="2" />
</filter>
</link-entity>
<link-entity name="opportunity" from="opportunityid" to="opportunityid" link-type="outer">
<attribute alias="sum_won" name="actualvalue" aggregate="sum"></attribute>
<filter>
<condition attribute="statecode" operator="eq" value="1" />
</filter>
</link-entity>
<attribute groupby="true" alias="groupby_column" name="ownerid"></attribute>
</entity>
</fetch>
</fetchcollection>
<categorycollection>
<category>
<measurecollection>
<measure alias="sum_won" />
</measurecollection>
<measurecollection>
<measure alias="sum_lost" />
</measurecollection>
</category>
</categorycollection>
</datadefinition>
</datadescription>
<presentationdescription>
<Chart Palette="None" PaletteCustomColors="97,142,206; 168,203,104; 209,98,96; 142,116,178; 93,186,215; 255,155,83; 148,172,215; 217,148,147; 189,213,151; 173,158,196; 145,201,221; 255,180,138">
<Series>
<Series Name="o:opportunity_statecode,1" Color="149, 189, 66" IsValueShownAsLabel="False" BackGradientStyle="TopBottom" BackSecondaryColor="112, 142, 50" Font="{0}, 9.5px" LabelForeColor="59, 59, 59">
<SmartLabelStyle Enabled="True" />
</Series>
<Series Name="o:opportunity_statecode,2" Color="255,124,31" IsValueShownAsLabel="False" BackGradientStyle="TopBottom" BackSecondaryColor="235,98,0" Font="{0}, 9.5px" LabelForeColor="59, 59, 59">
<SmartLabelStyle Enabled="True" />
</Series>
</Series>
<ChartAreas>
<ChartArea BorderColor="White" BorderDashStyle="Solid">
<AxisY LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181">
<MajorGrid LineColor="239, 242, 246" />
<MajorTickMark LineColor="165, 172, 181" />
<LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
</AxisY>
<AxisX LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181">
<MajorGrid Enabled="False" />
<MajorTickMark Enabled="False" />
<LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
</AxisX>
</ChartArea>
</ChartAreas>
<Titles>
<Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="0, 0, 0"></Title>
</Titles>
<Legends>
<Legend Alignment="Center" LegendStyle="Table" Docking="Bottom" Font="{0}, 11px" ForeColor="59, 59, 59"></Legend>
</Legends>
</Chart>
</presentationdescription>
<isdefault>false</isdefault>
</visualization>
Notice the "filter" tags in each link-entity? Also see that there are two "measure collections" which define the series, and two entries for the presentation of these eg the colour.

Related

EXTjs: Cartesian Chart min column width

I use a dynamic cartesianchart, but when the columns are too many its resize them to fit the chart. But I want the columns to have a minimum column width, otherwise the chart is not readable. The page has 2 panels, in the top one there is the CartesianChart and a PolarChart. I follow this example
Code:
<ext:Panel ID="Panel1" runat="server" Height="250" MarginSpec="0 0 3 0">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:CartesianChart
ID="BarChart1"
runat="server"
Border="true"
Flex="4"
StoreID="storeSites" AutoScroll="true" Resizable="true" >
<Interactions>
<ext:ItemHighlightInteraction />
</Interactions>
<AnimationConfig Duration="300" Easing="EaseOut" />
<Axes>
<ext:NumericAxis Position="Left" Fields="patientstarget" Minimum="0" Hidden="true" />
<ext:CategoryAxis Position="Bottom" Fields="site">
<Label Font="9px Arial" RotationDegrees="-45" />
<Renderer Handler="return Ext.String.ellipsis(label, 15, false);" />
</ext:CategoryAxis>
</Axes>
<Series>
<ext:BarSeries
Highlight="true"
XField="site"
YField="patientstarget" >
<StyleSpec>
<ext:Sprite FillStyle="#456d9f" />
</StyleSpec>
<HighlightConfig>
<ext:Sprite FillStyle="#619fff" StrokeStyle="black" />
</HighlightConfig>
<Label
Display="InsideEnd"
Field="patientstarget"
Color="#000"
Orientation="Vertical"
TextAlign="Center"
/>
<Listeners>
<ItemMouseUp Fn="onMouseUp" />
</Listeners>
</ext:BarSeries>
</Series>
<Plugins>
<ext:ChartItemEvents ID="ChartItemEvents1" runat="server" />
</Plugins>
</ext:CartesianChart>
//PolarChart
</Items>
</ext:Panel>

Chart series label as a percent

I am using the Chart component in MS Visual Studio 2010 via System.Web.UI.DataVisualization.Charting. I am having trouble with the column graph, where I want to show label as percentage. The graph shows number of decisions (positive - green, negative - red, neutral - blue) in each month throughtout the whole year. Trouble is that if I use the following commands...
ChartDecisionDyn.Series["Positive"].IsValueShownAsLabel = true;
ChartDecisionDyn.Series["Positive"].Label = "#PERCENT";
...I do not get supposed percentage result. The result shown states number of positive decisions in certain month / number of positive decisions throughout the year, but my desired result is number of positive decisions in certain month / number of total decisions on the certain month. Does anyone have any suggestion? Thanks in advance for any help.
You can see the details of my graph here
Could not see the image for your chart but I did this:
<asp:Chart ID="Chart1" runat="server" DataSourceID="ObjectDataSource1" Width="451px">
<Series>
<asp:Series Name="Series1" XValueMember="Month" YValueMembers="Percentage"></asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<AxisY>
<LabelStyle Format="P0" />
</AxisY>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
OR this:
Chart1.ChartAreas[0].AxisY.LabelStyle.Format = "P0";
and got this:
EDIT: What about this:
<asp:Chart ID="Chart1" runat="server" DataSourceID="ObjectDataSource1" Width="451px">
<Series>
<asp:Series Name="Series1" XValueMember="Month" YValueMembers="Percentage" IsValueShownAsLabel="True" LabelFormat="F2"></asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<AxisY>
<MajorGrid LineColor="DarkGray" LineDashStyle="Dot" />
<LabelStyle Format="P0" />
</AxisY>
<AxisX>
<MajorGrid Enabled="False" />
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="WebApplication9.DataPoint" DeleteMethod="Remove" InsertMethod="Add" SelectMethod="ToArray" TypeName="WebApplication9.DataPointList" UpdateMethod="Add"></asp:ObjectDataSource>
EDIT 2: Adding multiple series.
<asp:Chart ID="Chart1" runat="server" DataSourceID="ObjectDataSource1" Width="499px">
<Series>
<asp:Series Name="Percent" XValueMember="Month" YValueMembers="Percent" IsValueShownAsLabel="True" LabelFormat="P0" Legend="Legend1" YAxisType="Secondary"></asp:Series>
<asp:Series ChartArea="ChartArea1" IsValueShownAsLabel="True" LabelFormat="N0" Legend="Legend1" Name="Positive" XValueMember="Month" YValueMembers="Positive">
</asp:Series>
<asp:Series ChartArea="ChartArea1" IsValueShownAsLabel="True" LabelFormat="N0" Legend="Legend1" Name="Neutral" XValueMember="Month" YValueMembers="Neutral">
</asp:Series>
<asp:Series ChartArea="ChartArea1" IsValueShownAsLabel="True" LabelFormat="F0" Legend="Legend1" Name="Negative" XValueMember="Month" YValueMembers="Negative">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<AxisY>
<MajorGrid LineColor="DarkGray" LineDashStyle="Dot" />
</AxisY>
<AxisX>
<MajorGrid Enabled="False" />
</AxisX>
<AxisY2>
<MajorGrid LineColor="DarkGray" LineDashStyle="Dot" />
<LabelStyle Format="P0" />
</AxisY2>
</asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend Alignment="Center" Docking="Top" Name="Legend1">
</asp:Legend>
</Legends>
</asp:Chart>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="WebApplication11.DecisionPoint" DeleteMethod="Remove" InsertMethod="Add" SelectMethod="ToArray" TypeName="WebApplication11.DecisionPointList"></asp:ObjectDataSource>
Use ChartDecisionDyn.Series["Positive"].LabelFormat like ChartDecisionDyn.Series["Positive"].LabelFormat="#.00′ %'";
My understanding is that those options are mutually exclusive. The second will overwrite the first. How about setting IsValueShownAsLabel=true and setting the value of the positive point =positive/(positive+negative+neutral)*100
or set series Label="#LABEL" and when adding the point's value also add the point's label equal to positive/(positive+negative+neutral)*100 as a string

Setting Client Credentials in VSTO

I'm trying to implement authentication using VSTO. I've added a web service reference which points to the WSDL below and it's generated all the classes necessary, however I can't find a class for the authentication, even though this is specified in the WSDL. I've tried editing the app.config file to make:
<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
however, I still can't seem to get VS to generate the authentication classes which it should have auto-generated. Am I going about this the right way? Another option I searched was to create a SOAP extension. As all that really needs to happen is for the header to contain this authentication information:
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="Timestamp-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2014-01-05T22:25:10.334Z</wsu:Created>
<wsu:Expires>2014-01-06T15:05:10.334Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>MyUserName</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MyNonce==</wsse:Nonce>
<wsu:Created>2014-01-05T22:25:10.334Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
WSDL:
<?xml version="1.0" encoding="utf-8"?>
<s0:definitions xmlns:s1="http://rsm.govt.nz/smart/download" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/" name="DownloadService" targetNamespace="http://rsm.govt.nz/smart/download" xmlns:s0="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UTOverTransport">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
</wsp:Policy>
</sp:SignedSupportingTokens>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<s0:types>
<xs:schema xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://rsm.govt.nz/smart/download" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://rsm.govt.nz/smart/download" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="DownloadLicences?xsd=LicenceDownloadService.xsd" />
</xs:schema>
</s0:types>
<s0:message name="LicenceDownloadException">
<s0:part name="errorMessage" element="s1:errorMessage" />
</s0:message>
<s0:message name="msgDetailResponse">
<s0:part name="detailResponse" element="s1:Licence" />
</s0:message>
<s0:message name="msgSearchResponse">
<s0:part name="searchResponse" element="s1:SearchResult" />
</s0:message>
<s0:message name="msgSearch">
<s0:part name="arg0" element="s1:SearchCriteria" />
</s0:message>
<s0:message name="msgDetail">
<s0:part name="arg0" element="s1:LicenceDetailsRequest" />
</s0:message>
<s0:portType name="LicenceDownloadWebService">
<s0:operation name="searchLicences">
<s0:input message="s1:msgSearch" />
<s0:output message="s1:msgSearchResponse" />
<s0:fault name="licenceDownloadException" message="s1:LicenceDownloadException" />
</s0:operation>
<s0:operation name="getLicenceDetails">
<s0:input message="s1:msgDetail" />
<s0:output message="s1:msgDetailResponse" />
<s0:fault name="licenceDownloadException" message="s1:LicenceDownloadException" />
</s0:operation>
</s0:portType>
<s0:binding name="LicenceDownloadServiceBinding" type="s1:LicenceDownloadWebService">
<s2:binding transport="http://schemas.xmlsoap.org/soap/http" />
<s0:operation name="getLicenceDetails">
<s2:operation soapAction="getLicenceDetails" style="document" />
<s0:input>
<s2:body use="literal" />
</s0:input>
<s0:output>
<s2:body use="literal" />
</s0:output>
<s0:fault name="licenceDownloadException">
<s2:fault use="literal" name="licenceDownloadException" namespace="" />
</s0:fault>
</s0:operation>
<s0:operation name="searchLicences">
<s2:operation soapAction="searchLicences" style="document" />
<s0:input>
<s2:body use="literal" />
</s0:input>
<s0:output>
<s2:body use="literal" />
</s0:output>
<s0:fault name="licenceDownloadException">
<s2:fault use="literal" name="licenceDownloadException" namespace="" />
</s0:fault>
</s0:operation>
</s0:binding>
<s0:service name="LicenceDownloadService">
<s0:port name="LicenceDownloadServicePort" binding="s1:LicenceDownloadServiceBinding">
<s2:address location="https://data.eat.business.govt.nz/services/DownloadLicences" />
</s0:port>
</s0:service>
</s0:definitions>
Any help would be greatly appreciated.
Cheers!
I'll have a talk to the WSDL provider. I expected all the authentication information was included in the WSDL already from what I could see from:
<?xml version="1.0" encoding="utf-8"?>
<s0:definitions xmlns:s1="http://rsm.govt.nz/smart/download" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/" name="DownloadService" targetNamespace="http://rsm.govt.nz/smart/download" xmlns:s0="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UTOverTransport">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
</wsp:Policy>
</sp:SignedSupportingTokens>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<s0:types>
I can also be sure that there is a header in each SOAP request as using SOAP UI the SOAP message raw looks like this:
POST https://data.eat.business.govt.nz/services/DownloadLicences?wsdl HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "searchLicences"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: data.eat.business.govt.nz
Content-Length: 1219
<soapenv:Envelope xmlns:dow="http://rsm.govt.nz/smart/download" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="Timestamp-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2014-01-05T22:25:10.334Z</wsu:Created>
<wsu:Expires>2014-01-06T15:05:10.334Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>MyUserName</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MyNonce==</wsse:Nonce>
<wsu:Created>2014-01-05T22:25:10.334Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<dow:SearchCriteria clientId="506682">
</dow:SearchCriteria>
</soapenv:Body>
</soapenv:Envelope>
Kind Regards
Evan
<s0:binding name="LicenceDownloadServiceBinding" type="s1:LicenceDownloadWebService">
<s2:binding transport="http://schemas.xmlsoap.org/soap/http" />
<s0:operation name="getLicenceDetails">
<s2:operation soapAction="getLicenceDetails" style="document" />
<s0:input>
<s2:body use="literal" />
</s0:input>
<s0:output>
<s2:body use="literal" />
</s0:output>
<s0:fault name="licenceDownloadException">
<s2:fault use="literal" name="licenceDownloadException" namespace="" />
</s0:fault>
</s0:operation>
<s0:operation name="searchLicences">
<s2:operation soapAction="searchLicences" style="document" />
<s0:input>
<s2:body use="literal" />
</s0:input>
<s0:output>
<s2:body use="literal" />
</s0:output>
<s0:fault name="licenceDownloadException">
<s2:fault use="literal" name="licenceDownloadException" namespace="" />
</s0:fault>
</s0:operation>
Above is your wsdl bindings, I am not able to see any operation here, responsible for authentication. That's why it's not generating your required class, i guess.
Ask your wsdl provider to implement authentication method which is required by you and regenerate wsdl..
Updated:
The authentication information e.g. username, password etc. are all included within the header of each SOAP method. Which means when I send a "searchLicences" or "getLicenceDetails" message it will include the authentication details within the header of those messages
How are you so sure about header of soap message because as per your wsdl there is no soap header will come in your request.
<s2:binding transport="http://schemas.xmlsoap.org/soap/http" />
<s0:operation name="getLicenceDetails">
<s2:operation soapAction="getLicenceDetails" style="document" />
<s0:input>
<s2:body use="literal" />
</s0:input>
<s0:output>
<s2:body use="literal" />
</s0:output>
<s0:fault name="licenceDownloadException">
<s2:fault use="literal" name="licenceDownloadException" namespace="" />
</s0:fault>
</s0:operation>
If there would be a header in your incoming soap request it would be something like this.
<s2:binding transport="http://schemas.xmlsoap.org/soap/http" />
<s0:operation name="getLicenceDetails">
<s2:operation soapAction="getLicenceDetails" style="document" />
<s0:input>
<s2:body use="literal" />
<s2:header message="tns:getAuthHeader" part="username" use="literal" />
<s2:header message="tns:getAuthHeader" part="password" use="literal" />
</s0:input>
<s0:output>
<s2:body use="literal" />
</s0:output>
<s0:fault name="licenceDownloadException">
<s2:fault use="literal" name="licenceDownloadException" namespace="" />
</s0:fault>
</s0:operation>
There is one more thing, sometimes webservice provider hide few methods like authentication in wsdl. You should consult your wsdl provider to include that method in your wsdl. Otherwise you won't able to generate that class in your client.

asp.net Chart colours

How to set the grid/text colour of an asp:chart?
I'm refering to the colour of the gridlines and the colour of the text on the x and y axis?
Basically I want the black grid and black text below to be shown as white.
In your ChartArea you need to set the X and Y axis colors:
<ChartAreas>
<asp:ChartArea Name="ChartArea1" >
<AxisY>
<MajorGrid LineColor="White" />
<MajorTickMark LineColor="White" />
<LabelStyle ForeColor="White" />
</AxisY>
<AxisX>
<MajorGrid LineColor="White" />
<MajorTickMark LineColor="White" />
<LabelStyle ForeColor="White" />
</AxisX>
</asp:ChartArea>
</ChartAreas>
There are options for MajorGrid, MinorGrid and StripLines. The LabelStyle sets your text.

Install features based on checkboxes

I am trying to make it so that when the user selects something via check box, a corresponding feature will be installed.
I am aware of the prebuilt feature tree that Wix provides but there are some other things that I am doing that do not allow me to use this function. I am curious as to how to link the two together so that when the user selects the check box "Install Feature X", feature X is installed when the user clicks the install button.
I found what it was that solves my issue. To do as I had intended, I needed to create a checkbox for each feature as so.
<Control Id="FeatureX" Type="CheckBox" X="191" Y="50" Width="140" Height="17"
Property="FEATUREX_CHECKED" CheckBoxValue="myValue" Text="Install feature X" />
<Control Id="FeatureY" Type="CheckBox" X="191" Y="67" Width="140" Height="17"
Property="FEATUREY_CHECKED" CheckBoxValue="myValue" Text="Install feature Y" />
<Control Id="FeatureZ" Type="CheckBox" X="191" Y="84" Width="140" Height="17"
Property="FEATUREZ_CHECKED" CheckBoxValue="myValue" Text="Install feature Z" />
Now once I did that I then added a corresponding publish to each, and made a condition that made it so that only if the check box is selected will that feature be installed. Like so:
<Control Id="Next" Type="PushButton" Text="Next" X="254" Y="243" Height="17" Width="56">
<Publish Event="Remove" Value="ALL" Order="1">1</Publish>
<Publish Event="AddLocal" Value="FeatureX" Order="2">
<![CDATA[FEATUREX_CHECKED]]>
</Publish>
</Control>
NOTE:
Remove is used to deselect everything from being installed (It was brought to my attention that once the UI is invoked, it is too late to change feature levels).
Then each feature is checked to see if the "corresponding checkbox" has been selected and if so adds it to the "AddLocal" Property. AddLocal would look like this if one were to look at it:
ADDLOCAL=FeatureX, FeatureY, FeatureZ...
The final thing I needed to do to get this to work was too check in my main.wxs to make sure that the FeatureID used in the checkboxes matched up with the ComponentGroupRefID used:
<ComponentGroupRef Id="FeatureX"/>
So there it is...
I again, thank everyone for their help with this. If anyone reading this is confused by anything, please feel free to drop me a line, and I will do my best to explain things a little bit further.
This is my sample code for installing features
Product.wxs
<Product Id="{C9FD5DDE-2625-4E01-B415-8A734464F341}"
Name="!(wix.Product)" Language="1033" Version="1.0.0.0"
Manufacturer="!(wix.Manufacturer)" UpgradeCode="!(wix.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" Languages="1033"
Manufacturer="!(wix.Manufacturer)" Description="!(wix.ProductDesc)"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<WixVariable Id="UpgradeCode" Value="{E5695E2A-EE5F-4EEE-A326-98A9F8B2EF0A}"/>
<WixVariable Id="Manufacturer" Value="BSDreams"/>
<WixVariable Id="Product" Value="WixSubFeatures"/>
<WixVariable Id="ProductDesc" Value="Minimal select one feature install"/>
<WixVariable Id="ProductIcon" Value="chk_on.ico"/>
<WixVariable Id="WixSubFiles" Value=".\Files"/>
<Property Id="ARPNOMODIFY" Value="0" />
<Property Id="ARPPRODUCTICON" Value="!(wix.ProductIcon)" />
<Property Id="INSTALLDIR">
<RegistrySearch Id="WixSubFeaturesSearch" Type="raw" Root="HKCU"
Key="!(wix.Manufacturer)\!(wix.Product)" Name="InstallDir" />
</Property>
<Icon Id="chk_on.ico" SourceFile="!(wix.WixSubFiles)\!(wix.ProductIcon)"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ManufacturerDir" Name="!(wix.Manufacturer)">
<Directory Id="INSTALLDIR" Name="!(wix.Product)">
<Component Id="ProductMain" Guid="{FF35C142-480A-4d67-A2ED-E5C9E508F809}">
<CreateFolder />
<RegistryKey Id="WixSubDirReg" Root="HKCU" Key="!(wix.Manufacturer)\!(wix.Product)" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="[INSTALLDIR]" Action="write"/>
</RegistryKey>
</Component>
</Directory>
</Directory>
</Directory>
<UIRef Id="UserInterface"/>
<Feature Id="PRODUCTFEATURE" Title="!(wix.Product)" Level="1" >
<ComponentRef Id="ProductMain"/>
<ComponentRef Id="IconFile"/>
<Feature Id="OPTIONA" Title="Option A" Level="1" >
<ComponentRef Id="TestFileA"/>
</Feature>
<Feature Id="OPTIONB" Title="Option B" Level="3" >
<ComponentRef Id="TestFileB"/>
</Feature>
<Feature Id="OPTIONC" Title="Option C" Level="3" >
<ComponentRef Id="TestFileC"/>
</Feature>
</Feature>
<DirectoryRef Id="INSTALLDIR">
<Component Id="IconFile" Guid="{967A5110-B0F8-47b0-967B-CC4624D06EA5}">
<File Id="IconFileA" Source="!(wix.WixSubFiles)\!(wix.ProductIcon)" Name="chk_on.ico" Vital="yes" />
</Component>
<Component Id="TestFileA" Guid="{F5ACE3D7-03DE-47a7-9CE8-50CEF5E9A7BF}">
<File Id="SomeFileA" Source="!(wix.WixSubFiles)\SomeFileA.txt" Name="BSDA.txt" Vital="yes"/>
</Component>
<Component Id="TestFileB" Guid="{CB5D53FB-8CED-42ef-89FF-08C7709CFCA5}">
<File Id="SomeFileB" Source="!(wix.WixSubFiles)\SomeFileB.txt" Name="BSDB.txt" Vital="yes" />
</Component>
<Component Id="TestFileC" Guid="{987EA193-A1E0-41d2-8E9D-87D30D8F03AD}">
<File Id="SomeFileC" Source="!(wix.WixSubFiles)\SomeFileC.txt" Name="BSDC.txt" Vital="yes" />
</Component>
</DirectoryRef>
<CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
<InstallExecuteSequence>
<Custom Action="SetARPINSTALLLOCATION" After="InstallValidate"></Custom>
</InstallExecuteSequence>
</Product>
UserInterface.wxs
<Fragment Id="WixSubUI">
<UI Id="UserInterface">
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="WixUI_Mode" Value="Custom" />
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="9" Bold="yes" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="FatalError" />
<DialogRef Id="UserExit" />
<DialogRef Id="InstallDirDlg"/>
<DialogRef Id="FeaturesDlg" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="2"></Publish>
<Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="FeaturesDlg">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="ExitDialog" Order="2">1</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
</UI>
<UIRef Id="WixUI_Common" />
This will give you a basic installer that installs base on the selected features checkbox UI
The advice for check boxes is eerily similar to that for radio buttons. Use AddLocal and Remove control events on the Next or Install button, each of which condition against the property tied to your check boxes. It's too late to use feature install levels by the time you're showing UI to the user.

Categories

Resources