本文介绍了如何将详细部分数据中的一行传递给子报表中的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 您好,我是水晶报告的新手。实际上我有这样的报告 Studentreport 页眉部分 RollNo:12478名称:chiti 详细信息部分: 主题电话地址持续时间日期标记garde MM 040-2345 xx 2 25-10-2013 A Phs 0808-67854 yy 4 26 - 10-2013 B 这个我的报告我想在这份报告中创建一个子报告。所以我这样做了通过这些步骤 步骤1:我右键单击详细信息部分并单击子报告 步骤2:将打开一个对话框子报告选项卡我选择.in我选择3一个意味着使用rep [ort wizard创建一个子报告,我给出了一个名称并单击报告向导,如点击接下来每次报到空白报告 step3:在那个空白的报告中我根据我们的要求设计 最后我是完成,但这里prblm是当我点击主题coloumn在mm行的子报告时只有rollno,name,mm只有这个值才会报告子报告但我们的要求是我必须通过地址,durattion,日期,等级标记也是 所以plz帮助我如何将细节中的一行传递给子报告中的参数解决方案 只需传递一行? dim myRow = theRowToPass ....在这里决定你需要什么,即在传递之前使用tostring ...我假设行为字符串数组 dim reportParam(0)as Microsoft.reporting.winforms.reportparameter reportParam(0)= new Microsoft。 reproting.winforms.reportparameter(ReportParameterName,CType(myRow.ToArray(GetType(String)),String())) me.reportviewername.localreport.s etparameters(reportParam) me.reportviewername.refresh() 当然假设你收到行后正确配置。 :) Hi i am new to crystal report.Actuvally i have a report like this StudentreportHeader sectionRollNo:12478 name:chitiDetailSection:subject phone address duration date marks garde MM 040-2345 xx 2 25-10-2013 A Phs 0808-67854 yy 4 26 -10-2013 Bthis my report for this i want to create a sub report in this report.so i was done like this by going throught these stepsStep1:i right click on detail section and click on subreportStep2: a dialog box will open in that subreport tab i choose .in that i select 3 one means"create a subreport with rep[ort wizard" in that i given a name and click on report wizard like that click next every time a get a report with blank onestep3: in that blank one i was design as per our reqrement finally i was done that but here prblm is when iwas click on subreport at subject coloumn at mm row only rollno, name ,mm only this values are going to sub report but our req is i have to pass address ,durattion ,date,grade marks also so plz help me how to pass one row in details to parameters in subreport 解决方案 Just pass a row?dim myRow = theRowToPass .... decide here what you need, i.e. tostring before you pass ... I assumed the row as a string arraydim reportParam(0) as Microsoft.reporting.winforms.reportparameterreportParam(0) = new Microsoft.reproting.winforms.reportparameter("ReportParameterName", CType(myRow.ToArray(GetType(String)), String()))me.reportviewername.localreport.setparameters(reportParam)me.reportviewername.refresh()Of course that is assuming that you are configured correctly once you receive the row. :) 这篇关于如何将详细部分数据中的一行传递给子报表中的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 21:07