ASP 장점은 쉽게 tool을 사용할 수 있다는 것이다.

텍스트 박스에 달력을 연결하려고 하니, ajax로 사용해야한다.

출처: http://www.asp.net/ajaxlibrary/act_Calendar_Simple.ashx 

원하는 포맷은 CalendarExtender의 format에서 정해주면 된다.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SimplePopupCalendar._Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
       
        <asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
       
        <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtStartDate"
            runat="server" Format="yyyyMMdd">
        </asp:CalendarExtender>
    </div>
    </form>
</body>
</html>
 


Posted by 노을지기

출처: http://datamart.org/2009/06/09/crystal-reports-totext-and-towards-function/

크리스탈 리포트에서 금액을 글자로 변경할 일이 있다.

구글 검색하니, Towords 함수를 사용하면 된다.

그런데, Towords({금액}, 0)을 하면 서버 환경에 따라 한글로 변경되었다.


USD로 할 경우 Towords({금액}, 2)을 하니 해결되었다.

그런데 크리스탈 레포트 레퍼런스는 어디에 있는건가? 있으면 금방 찾을텐데..

시간이 없어 다른 테스트는 못해봤다.

나중 시갈날때 업데이트.. 계획 중..

Posted by 노을지기

출처: http://forums.asp.net/t/1442445.aspx/1

크리스탈 리포트를 사용할때 여러개의 테이블을 사용할 경우가 많다.

구글 검색해도 잘 못찾다가 자세히 읽어보니.. 답이 나온다..

영어 대충 읽으면 안될듯..ㅠㅠ


이것이 핵심..ㅠㅠ


report.Database.Tables[0].SetDataSource(ds.Tables[0]);

report.Database.Tables[1].SetDataSource(ds.Tables[1]);



using CrystalDecisions.CrystalReports.Engine;


ReportDocument report = new ReportDocument();

DataSet ds = new DataSet();

ds = FillMyDataset();         //// fill your dataset.


report.Load(Server.MapPath("your_reportFilename_goes_here.rpt"));

report.SetDataSource(ds.Tables[0]);   /// commonly used for single tabled reports...

///  for multiple tables


report.Database.Tables[0].SetDataSource(ds.Tables[0]);

report.Database.Tables[1].SetDataSource(ds.Tables[1]);

report.Database.Tables[2].SetDataSource(ds.Tables[2]);

...

report.Database.Tables[n].SetDataSource(ds.Tables[n]);



<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">report.Subreports[0].SetDataSource(ds.Tables[1]);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">      //report.Subreports[1].SetDataSource(ds.Tables[2]);</div>

///   In case if you're using sub - reports, try this

report.Subreports[0].SetDataSource(ds.Tables[1]);

report.Subreports[1].SetDataSource(ds.Tables[2]);


Dont forget to mark as answer if this helps you.

Posted by 노을지기

출처: http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=11249

char(8)으로 된 문자열 날짜를 크리스탈 리포트에서 날짜 포멧으로 변경하기 위해서는 date 타입으로 변경해야 한다.

구글에 검색하니 다음과 같았다.


date(mid(totext({CTCITE.cit_viol_date},0,''),5,2)+'/'+ right(totext({CTCITE.cit_viol_date},0,''),2) + '/' + left(totext({CTCITE.cit_viol_date},0,''),4))


Posted by 노을지기

출처: http://blog.hassantt.com/2007/07/crystal-reports-tip-newline-in-text.html


You can use Chr(10) to add a newline to a text field in Crytal Reports. It's seems obvious but I couldn't find anything in the help file and my initial thought was to use \n.

크리스탈 리포트를 사용하다가 텍스트를 합칠 경우가 있다.

그런데 라인 변경을 하려고하는데, 어떤 것인지 몰라서 검색 중에 찾게 되었다.


CHR(10)


Posted by 노을지기