Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: WebService and crystal report Post Reply Post New Topic
Author Message
jamesTengxh
Newbie
Newbie


Joined: 07 Jul 2013
Online Status: Offline
Posts: 5
Quote jamesTengxh Replybullet Topic: WebService and crystal report
     Posted: 18 Jul 2013 at 8:59pm
Hi All,
 
I have a question regarding web service and crystal report.
 
I have a report with several sub report. I have another web service that can return data for the whole report, but the main report and sub report using the data different part, like the web service return header A and details B, the header A is used by main report, and the details B is used by subreport.
 
Now my question is when I set the datasource for the main report as web service, then the web service return the data, how can I let my sub report use the main report data source?
 
I can set both the main report and sub report datasource as web service, but there will be 2 calls to the web service, it takes longer time.
 
Hope anyone had same issue with me and give me some idea to solve this, thanks.
 
Note: can not seperate the web service as 2 web service, because this part can not be changed.
 
Thanks.
 
 
 
 
 
 
IP IP Logged
jamesTengxh
Newbie
Newbie


Joined: 07 Jul 2013
Online Status: Offline
Posts: 5
Quote jamesTengxh Replybullet Posted: 21 Jul 2013 at 12:22pm
Anybody can help , thanks!!!
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 21 Jul 2013 at 8:32pm
Hi
 
I think you can even pass information from main report to sub report.
 
--Webservice should  header and detail in the main report
 
--Using shared variables you can pass the main report data to sub report
 
or
 
whatever data web service is returning in main report, assign this to a variable in a formula and pass the value to your sub report.
Thanks,
Sastry
IP IP Logged
jamesTengxh
Newbie
Newbie


Joined: 07 Jul 2013
Online Status: Offline
Posts: 5
Quote jamesTengxh Replybullet Posted: 22 Jul 2013 at 12:53pm
Thanks your reply, Sastry.
 
I thought using the shared variables, but the web service return the complex object, it has header data it is used by the main report, and details will be used by sub report, is there any way to define a complex variable to save the whole details object?
 
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum