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

SubReport Passing Parameter through Web Form

5 Answers 329 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Suriya
Top achievements
Rank 1
Suriya asked on 20 Feb 2009, 09:09 AM
Hi,,
 This is Again Suriya...

I didnt get a clear idea about wwaping text in a textbox with 2 fields.......

ok  Now i have doubt in passing parameters in subreport from the web form...

Now I have two sub reports named sub1 & sub2 ,,, In the main report i called that two subreports...

Note : Sub1 & Sub2 have sqladapters aeperately , but the main report has no connection from the DB...
then how can i pass the parameter..

please reply as soon as possible

          By
    S.Suriya

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 Feb 2009, 01:26 PM
Hi Suriya,

It would be great if you explain what is not clear about the textwrap property, so that we can clear any confusion.
About your new inquiry, it seems like you want to create Master-Detail report scenario. Generally the idea is to use some primary key column from the current master row (from Master report datasource) to select all matching detail rows (for the subreport) and a report parameter is used to filter the detail report. As you can see, all this requires that the main report is databound. Please elaborate on your exact case, so we can provide more to the point info.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Suriya
Top achievements
Rank 1
answered on 24 Feb 2009, 04:23 AM
hi..
    sir , i have created two subreports separately with a same stored function using sqladapter....
and in the main report i have call the two subreports., by without a data source ., then how can i pass the parameter value from the web form., please give me some example,,,,

about the text wrapping.,
i am displaying two fields in a single text box., 
but the output must have a line break between the two fields.,

i think now you catch my problem.,...

By

Suriya     
0
Steve
Telerik team
answered on 26 Feb 2009, 02:04 PM
Hello Suriya,

If you have wired the subreport param to the parameter value of the main report, like you should with a master-detail report, you can proceed by passing the value to the main report parameter directly as guided in previous threads:

Me.ReportViewer1.Report.ReportParameters("MyParam").Value = <your_reportparam_value>;

If you want to set it directly:

Telerik.Reporting.SubReport sub = this.ReportViewer1.Report.Items.Find("subReport1", true)[0] as Telerik.Reporting.SubReport;
sub.Parameters[0].Value =
<your_reportparam_value>;

As for the textwraping, since I could not understand what is the problem you experience - I've prepared a sample report using two data fields in a textbox item with TextWrap=true i.e. they show on different lines when there is not enough space.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Suriya
Top achievements
Rank 1
answered on 27 Feb 2009, 04:29 AM
hi..

 Sir in subreport, i am passing the parameter value through the web form ., so the parameter value does not passed to the corresponding parameter which is created by the stores procedure., Instead of that "NullException " error was occuring.,


By
Suriya
0
Steve
Telerik team
answered on 27 Feb 2009, 08:28 AM
Hello Suriya,

Set a break point and try debugging to see where the null reference exception comes from. The code provided in the previous post has been tested and works.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Suriya
Top achievements
Rank 1
Answers by
Steve
Telerik team
Suriya
Top achievements
Rank 1
Share this question
or