cancel
Showing results for 
Search instead for 
Did you mean: 

CR - How to create 2 subreports which have the same formatting?

leon_laikan
Participant
0 Kudos

Hi everybody!

I have a main CR report which contains several on-demand subreports.

Sub1 is already complete.

I now want to create Sub2 so that (apart from the different fields), it looks exactly as Sub1 as far as placement of the rows are concerned.

Sub2 should have same number of rows on each page as Sub1. and the rows should occupy identical positions.

Both Sub1 and Sub2 have 2 fields in common: Department and ItemCode, but the other fields may be different. Also the datasource is another stored procedure.

An analogy will help here:

If I print both subreports separately, and then  glue the 2 subreports end to end, they should read like a single giant report.

How should I proceed to achieve this?

Can I start from a copy of Sub1 and modify the datasource (which is another stored procedure) and modify the fields to arrive at Sub2?

Thanks

Leon Lai

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Leon,

Yes, set the Datasource location of Subreport 2 to point to the new Stored proc.

You would need to map fields manually though, however, this might be the easiest way to go about doing this.

-Abhilash

leon_laikan
Participant
0 Kudos

Hi Abhilash,

Thanks for your response.

If I map the fields manually, will I not risk losing all the old fields?

And hence, I cannot place the new fields in the exact places where the old fields were?

Thanks for adding some clarification.

Best Regards,

Leon Lai

abhilash_kumar
Active Contributor
0 Kudos

Hi Leon,

What do you mean by "old fields"? Using the Set Datasource Location feature, you can map each field from the old datasource with fields from the new datasource.

This will ensure, every formula and fields on the report canvas are replaced fields from the new datasource.

-Abhilash

leon_laikan
Participant
0 Kudos

Oh! Really you can do that?

This would be great!

I will try it tomorrow morning

Thanks a lot for your great help.

Leon Lai

closing

Answers (0)