2014년 9월 24일 수요일

[Spotfire Configuration Tools] Create Bootstrap Error : when using MSSQL




Error 발생 이미지1
Error Message
: 실행되고 있는 포트에서 TCP/IP 연결을 허용하고 있는지 확인하십시오.












Error Message
: Connection Refused connect
                   








    =============================================================
   위 에러를 해결 하기 위해서는 TCP/IP 를 사용을 허용해 주면 됨.
 
    방법 ] SQL Server 구성관리자의 프로토콜의 TCP/IP 사용으로 변경




[이미지1]시작->MSSQL2008->구성도구




















1.Sql Server Configuration Manager 의 설정을 확인
  => 확인 결과 : TCP/IP 가 사용안함 상태임.





 2. TCP/IP 우클릭후 -> 사용으로 변경
3.  TCP/IP 우클릭후 -> 속성->IP 주소
: IP1 의 사용여부가 Default 로 아니오 되어있음
4.  TCP/IP 우클릭후 -> 속성->IP 주소
: IP1 의 사용여부 아니오 -> 예 로 변경








5. SQL 서버 재 실행

2014년 9월 2일 화요일

[ Spotfire 6.5 API ] For C#_After TablePlot addNew , Only First DataTable Row select with Default Marking Selection.

          

Marking row 를 Developer C# API 로 구현 

Key Point 1.  IndexSet(Int32,Boolean)

(1) IndexSet 란 :  선택해야하는 row 인덱스를 포함하고 있는 index Set 이다.
                       : Int32 -> capacity
                         Boolean -> 모든 인덱스의 현재 마킹상태를 초기화
                                          true = marking check
                                          false = marking uncheck


===========================================================================================

                // 8. function 실행
                 function.Execute(delegate
                 {
                     // Since we will access the document we must execute on the application thread.
                     ApplicationThread applicationThread = document.Context.GetService<ApplicationThread>();
                     applicationThread.Invoke(
                         delegate
                         {

                             // Make sure the data table was succesfully generated so we can create the resulting page.
                             if (document.Data.Tables.Contains(outputDT[0]))
                             {
                                
                                 document.Transactions.ExecuteTransaction(
                                     delegate
                                     {

                                         Page page = commonManager.VisualizetionMethod.CreatePage(document, commonManager.PageMethod.IsExistSameDataTableName(PromptModel.Name, document.Pages));

                                           TablePlot   sumTablePlot = commonManager.VisualizetionMethod.CreateSumTableForTwoWayAnova(analysisApp, document, page, outputDT[0]);
                                         TablePlot resultTablePlot = commonManager.VisualizetionMethod.CreateAovTableForTwoWayAnova(analysisApp, document, page,outputDT[1]);
                                       //  BoxPlot responseScatterPlot = commonManager.VisualizetionMethod.CreateBoxPlot(analysisApp, document,page,dicInputParameter[0].Name);
                                         //ScatterPlot residualsScatterPlot = visual.CreateResidualsVsFittedScatterPlot(analysisApp, document, page);

                                         commonManager.VisualizetionMethod.TwoWayAnovaLayoutSetting(analysisApp, sumTablePlot,resultTablePlot);

                                         // Marking 을위함
                                         int rowCount = document.Data.Tables[outputDT[0]].RowCount;
                                        DataMarkingSelection  marking = sumTablePlot.Data.MarkingReference;

                                        IndexSet indexSetTrue = new IndexSet(rowCount, true);

                                         
                                        DataValueCursor cursor = DataValueCursor.CreateFormatted(document.Data.Tables[outputDT[0]].Columns[0]);
                                        IEnumerable<DataRow>  rowEnumer= document.Data.Tables[outputDT[0]].GetRows(indexSetTrue, cursor);

                                        IEnumerator<DataRow> rowEnumerator=  rowEnumer.GetEnumerator();
                                        for (int i = 0;  rowEnumerator.MoveNext();i++ )
                                        {
                                             DataRow row = rowEnumerator.Current;
                                             if (row.Index>0)
                                             {
                                                 indexSetTrue[row.Index] = false;
                                            }
                                        }
                                        marking.SetSelection(new RowSelection(indexSetTrue), document.Data.Tables[outputDT[0]]);
                                     });
                                 transaction.Commit(); // We are done and commit the transaction.
                             }
                             else
                             {
                                 // The expected output data table doesn't exist. We roll back the transaction.
                                 transaction.Rollback();
                             }
                         });  //END  applicationThread.Invoke...
                 }); //END   function.Execute(delegate...