cancel
Showing results for 
Search instead for 
Did you mean: 

Sub report Datasource

Former Member
0 Kudos

Hi,

I have a subreport in my report which uses same data as the main report but shows a grouping based on different field.

EX: Main report shows tickets based on assigned group, sub report shows tickets based on priority.

I dont want to run same query again for sub report.

Is there any way we can use same data source both in main report and sub report?

Thanks,

Jyothi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The sub report will query the database every time even if the result sets are the same.

Former Member
0 Kudos

Yes.

What if subreport doesn't have any query and uses same data fetched in main report.

Former Member
0 Kudos

The subreport will always have a query no getting around that. As soon as you add a table and place the fields on the report it creates a query.

Former Member
0 Kudos

I am not adding any table here, just want to use the fields which are already in main report and group the data based on different field.

Edited by: Jyothi Yepuri on May 21, 2009 1:26 AM

Former Member
0 Kudos

You cannot pass for example a 100 records to a subreport from the main report. The subreport needs to access the database to get its data, No way around it.

Former Member
0 Kudos

Ok.

Thank you.

I want to show 2 grouping sections in my report. one based on assignee and other based on priority.

For the priority section grouping i am using sub report, as crystal allows only hierarchical groupings.

is there any way i can avoid subreport.

for ex,

Assignee New Closed

A 10 9

B 5 4

Priority New Closed

P1 4 7

P2 11 6

Edited by: Jyothi Yepuri on May 21, 2009 1:44 AM

Edited by: Jyothi Yepuri on May 21, 2009 1:45 AM

Former Member
0 Kudos

J,

Let me know if you are using SQL query, if yes then you can make it possible with SQL.

Create a dummy columns in your query itself.

Can you paste your query here?

Thanks

-Azhar

Former Member
0 Kudos

J,

Right click on your sub report from main report and click on change subreport links, select all the fields you want, these fields will appear in your sub report as parameters, group accordingly.

hope this helps.

Thanks

-Azhar

Former Member
0 Kudos

Thanks for the reply.

If I select all the fields thru Subreport links, in subreport grouping is disabled.