Jump to content
Software FX Community

ERROR: Input string was not in a correct format


BestMark
 Share

Recommended Posts

I'm trying to create a chart with 2 series and I keep an error when I attempt to build it.

Exception Details: System.FormatException: Input string was not in a correct format.

 My Code 

<

chartfx7:Chart ID="Chart1" runat="server" DataSourceID="ClientScoreDistribution" Height="250px" Width="375px">

<DataSourceSettings>

<Fields>

<chartfx7:FieldMap DisplayName="PercentOfShops" Name="PercentOfShops" Usage="Value" />

<chartfx7:FieldMap DisplayName="SurveyYear" Name="SurveyYear" Usage="ColumnHeading" />

<chartfx7:FieldMap DisplayName="ScoreGroupIncrementsOf10" Name="ScoreGroupIncrementsOf10" Usage="RowHeading" />

</Fields>

</DataSourceSettings>

<Series>

<chartfx7:SeriesAttributes Text="SurveyYear 0" />

<chartfx7:SeriesAttributes Text="SurveyYear 1" />

<chartfx7:SeriesAttributes Text="SurveyYear 2" />

</Series>

</chartfx7:Chart>

<br />

<asp:SqlDataSource ID="ClientScoreDistribution" runat="server" ConnectionString="<%$ ConnectionStrings:BMDW02.BMDWConnectionString %>"

SelectCommand="SELECT NDW_DetailRecords.ClientId, NDW_DetailRecords.QuestionnaireHeaderID, NDW_DetailRecords.SurveyYear, NDW_DetailRecords.ScoreGroupIncrementsOf10, COUNT(NDW_DetailRecords.NDW_DetailRecordsId) AS ScoreGroupNumberOfShops, NDW_EntitySnapshot.YTDNumberOfShops, CONVERT (decimal(18 , 4), CONVERT (decimal(18 , 4), COUNT(NDW_DetailRecords.NDW_DetailRecordsId)) / CONVERT (decimal(18 , 4), NDW_EntitySnapshot.YTDNumberOfShops)) AS PercentOfShops FROM NDW_DetailRecords INNER JOIN NDW_EntitySnapshot ON NDW_DetailRecords.ClientId = NDW_EntitySnapshot.ClientId AND NDW_DetailRecords.QuestionnaireHeaderID = NDW_EntitySnapshot.QuestionnaireHeaderID WHERE (NDW_DetailRecords.YearsBack IN (0, - 1)) AND (NDW_EntitySnapshot.OrgLevel = 'company') GROUP BY NDW_DetailRecords.ClientId, NDW_DetailRecords.QuestionnaireHeaderID, NDW_DetailRecords.ScoreGroupIncrementsOf10, NDW_EntitySnapshot.YTDNumberOfShops, NDW_DetailRecords.SurveyYear HAVING (NDW_DetailRecords.ClientId = @ClientId) AND (NDW_DetailRecords.QuestionnaireHeaderID = @QuestionnaireHeaderId)">

<SelectParameters>

 <asp:QueryStringParameter DefaultValue="SV" Name="ClientId" QueryStringField="ClientId" Type="String" />

<asp:QueryStringParameter DefaultValue="74" Name="QuestionnaireHeaderId" QueryStringField="QuestionnaireHeaderId" Type="Int32" />

</SelectParameters>

</asp:SqlDataSource>
Link to comment
Share on other sites

 Ok, lets try something.

 first, save your query . Then delete the filters in statement:  HAVING (NDW_DetailRecords.ClientId = @ClientId) AND (NDW_DetailRecords.QuestionnaireHeaderID = @QuestionnaireHeaderId)

 Try to compile and build you app. Does that make it build correctly?

If so, please put again  the same filters, but instead of the @ClientId and the @QuestionnaireHeaderId, embed the default values.  Did that worked?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...