This is a migrated thread and some comments may be shown as answers.

I want to bring the designer Parameter to the code.

1 Answer 100 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
KiHoon
Top achievements
Rank 1
KiHoon asked on 31 Jan 2020, 06:46 AM

Please excuse me because I am not familiar with English.

 

Hi. 

My WinForm is open report and report is open the secend report by subreport .

firstreport is passing 6parameter

--------------------------------------------------------------------------------------------------------------------------------------------------

            Telerik.Reporting.TypeReportSource typeReportSource1 = new Telerik.Reporting.TypeReportSource();
            typeReportSource1.Parameters.Add(new Telerik.Reporting.Parameter("AS_PLANTCODE", "=FIELDS.PLANTCODE"));
            typeReportSource1.Parameters.Add(new Telerik.Reporting.Parameter("AS_LOTNO", BarCode));
            typeReportSource1.Parameters.Add(new Telerik.Reporting.Parameter("AS_FIRSTFLAG", "=FIELDS.FIRSTFLAG"));
            typeReportSource1.Parameters.Add(new Telerik.Reporting.Parameter("AS_FROM", "=FIELDS.FROM"));
            typeReportSource1.Parameters.Add(new Telerik.Reporting.Parameter("AS_TO", "=FIELDS.TO"));
            typeReportSource1.Parameters.Add(new Telerik.Reporting.Parameter("AS_ODD", "1"));
            typeReportSource1.TypeName = "DAS.DA3301_R_Private_Sub1, DAS, Version=1.0.3.2, Culture=neutral, Pub" +
    "licKeyToken=null";
            this.subReport1.ReportSource = typeReportSource1;

--------------------------------------------------------------------------------------------------------------------------------------------------

and subreports are queried using parameters from parent reports in the data source.

subreport is output and 5 Textbox and 1 Picturebox

I want to use the parameter values of the designer in the source,

When i get the value into the source, value = "=Parameters.AS_LOTNO.Value"  be perceived as 

But if i use it to print out, "0001010101:20200131:1:2"

how can i use designer parameters in sourcecode ..TT

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 04 Feb 2020, 03:48 PM

Hello KiHoon,

I am not sure what is the exact requirement. If you would like to use the values that will be assigned to the subreport parameters in the custom code, you may try in the ItemDataBinding event of the subreport. The parameter values get evaluated by the reporting engine and cannot be accessed outside our code.

In this particular case, I see that these values are actually fields from the main report data source. You may also take them directly from the data source of the main report. You will have to use custom logic for this too.

Regards,
Todor
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Report Designer (standalone)
Asked by
KiHoon
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or