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

Make page duplicates

4 Answers 292 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tomaž Lovrec
Top achievements
Rank 1
Tomaž Lovrec asked on 02 Nov 2009, 02:29 PM
Hello,

how can I make duplicate of pages in Telerik Reporting?
The report is showing one page, which is good, but I'd like an exact copy of the first page, as the second page. Can this be done in an easy step? Or will it be faster to just copy/paste all the page contents(in designer) so that 2 pages will appear?

Best regards,
Thomas

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 02 Nov 2009, 04:50 PM
Hello Tomaž,

There are several approaches you can take:
  • duplicate the data in your database/business object so that the report would be bound to two records and thus its detail section repeated for the 2nd record as well
  • use SubReport item which uses the same report i.e. self referencing.
  • use a Report Book and add the report twice.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tomaž Lovrec
Top achievements
Rank 1
answered on 03 Nov 2009, 12:17 PM
Hi,

thanks for the reply.
Out of these 3, the most soutable one for me is the SubReport.
But now further on I have some parameter passing issues, between the main report and sub reports.
The report, which is then subreported I am picking up ReportParameters as follows:
[code]        private void prestop_NeedDataSource(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(this.ReportParameters["ID"].Value);
            PROFICIO_USERDataSet_prestopTableAdapters.PROFICIO_USERDataSet_prestopTableAdapter adapter = new PROFICIO_USERDataSet_prestopTableAdapters.PROFICIO_USERDataSet_prestopTableAdapter();
            PROFICIO_USERDataSet_prestop.PROFICIO_USERDataSet_prestopTableDataTable data = adapter.GetData(id);
            ((Telerik.Reporting.Processing.Report)sender).DataSource = data.AsDataView();
        }[/code]

And ReportParameters default value is set to 1.
And when running this report on it's own, it's working like clockwork, change the parameter value durring run-time, and new data gets picked up correctly.

On the report that's subreporting that report I also made a ReportParameter and am passing it to the subReport, but how on earth do I pick up the passed parameter on the single report?

Best regards,
Thomas
0
Chavdar
Telerik team
answered on 06 Nov 2009, 10:35 AM
Hi Tomaž Lovrec,

I suppose that the problem is the way in which you get the parameter value. Consider using the processing report instead of the report definition. Here is an example:

             Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report) sender;
              var parameters = report.Parameters;
             int id = Convert.ToInt32(parameters["ID"]);

Hope it helps.

Greetings,
Chavdar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Patrick Saunders
Top achievements
Rank 1
answered on 05 Dec 2011, 12:53 AM
For anyone else who comes across this thread, a very easy way to do this, if using SQLDataSource is to add a join to a dummy select statement that returns 2 rows. This will cause your data to double up, make sure you order by the original key so that you get data like:
row1
row1
row2
row2
row3
row3

In my case, my query looks like this:
The important part is the join to the select statement in brackets - think of it as a view.
==============================
select 'P' + RIGHT('00000'+ CONVERT(VARCHAR,Pallet.palletId),6) palletNumber, grower.growerNumber, pallet.unitCount
, variety.description + ', ' + Boxtype.description + ', ' + packType.description productDescription
from StockReceipt, Pallet, Product, Variety, BoxType, PackType, Grower
, (select 1 as dummy UNION ALL select 2 as dummy) doubleRecords
where 1=1
and pallet.growerId = grower.growerId
and Pallet.stockReceiptId = StockReceipt.stockReceiptId
and Pallet.productId = Product.productId
and Product.varietyId = Variety.varietyId
and Product.boxTypeId = BoxType.boxTypeId
and Product.packTypeId = PackType.packTypeId
and (StockReceipt.stockReceiptId = @stockReceiptId or Pallet.palletId=@palletId)
order by Pallet.palletId asc
==============================

Pat.
Tags
General Discussions
Asked by
Tomaž Lovrec
Top achievements
Rank 1
Answers by
Steve
Telerik team
Tomaž Lovrec
Top achievements
Rank 1
Chavdar
Telerik team
Patrick Saunders
Top achievements
Rank 1
Share this question
or