How to create sum

I want to add a textobject in pagefooter.
this textobject want to use : sum(w1)

My progem is ~~
Footer_memo1.DataField = "[Sum(<"W1">)]";
and i use c# in asp.net





IfrxBand MasterData1 = report.CreateReportObject(
page as TfrxDispatchableComponent/*IfrxComponent*/,
typeof(IfrxMasterData).GUID,
"MasterData1") as IfrxBand;


SetObjectPositionSize(MasterData1, 20, 20,
(int)((page as IfrxComponent).Width - page.RightMargin - page.LeftMargin) - 20,
30);


IfrxMemoView title_memo1 = report.CreateReportObject(
MasterData1 as TfrxDispatchableComponent/*IfrxComponent*/,
typeof(IfrxMemoView).GUID,
"Title memo1") as IfrxMemoView;


((IfrxDataBand)MasterData1).DataSet = (IfrxDataSet)query;
title_memo1.DataSet = (IfrxDataSet)query;
title_memo1.DataField = "W1";
SetObjectPositionSize(title_memo1, 0, 0,100,20);






IfrxBand FooterData1 = report.CreateReportObject(
page as TfrxDispatchableComponent/*IfrxComponent*/,
typeof(IfrxPageFooter).GUID,
"FooterData1") as IfrxBand;


SetObjectPositionSize(FooterData1, 20, 100,
(int)((page as IfrxComponent).Width - page.RightMargin - page.LeftMargin) - 20,
30);


IfrxMemoView Footer_memo1 = report.CreateReportObject(
FooterData1 as TfrxDispatchableComponent/*IfrxComponent*/,
typeof(IfrxMemoView).GUID,
"Footer memo1") as IfrxMemoView;



Footer_memo1.DataSet = (IfrxDataSet)query;
Footer_memo1.DataField = "[Sum(<"W1">)]";
SetObjectPositionSize(Footer_memo1, 0, 0, 100, 20);

Comments

  • edited December 2009
    Use following code:
                // Create PageFooter
                IfrxPageFooter footer = report.CreateReportObject(page as TfrxDispatchableComponent,
                    typeof(IfrxPageFooter).GUID, "PageFooter1") as IfrxPageFooter;
                (footer as IfrxComponent).Height = 32;
                IfrxMemoView memo4 = report.CreateReportObject(footer as TfrxDispatchableComponent,
                    typeof(IfrxMemoView).GUID, "Memo4") as IfrxMemoView;
                SetObjectPositionSize(memo4, 5, 5, 460, 22);
                memo4.Color = 0xAAAAAA;
                memo4.Memo = "[Sum(<DemoQuery.\"W1\">)]";
                memo4.Frame.FrameType = title_memo.Frame.FrameType;
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.