Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Passing data from main report to subreport Post Reply Post New Topic
Author Message
barry.ein
Newbie
Newbie
Avatar

Joined: 18 Feb 2015
Location: Israel
Online Status: Offline
Posts: 12
Quote barry.ein Replybullet Topic: Passing data from main report to subreport
    Posted: 28 Jan 2019 at 9:19pm
Hi all,

Whenever a user generates a report from the web application a view is created TW_RPT_123_123_123 with one column "id" that contains all the records that the report should display once generated. This view automatically linked to the PR.id table that is part of the report design.

I want to pass the view id values to the subreports but I don't know how to create a parameter for a view that all I know about is that is starts with TW_RPT.

Thanks for your help,

Barry
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 29 Jan 2019 at 4:08am
I did not think that views took parameters, just stored procedures.  Not sure of an easy solution here.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 04 Feb 2019 at 11:39am
Does the view always have the same name or does the name change with each run of the report? If the name changes, does the table get created from the web application or are you running a stored procedure in the main report that creates the table?

-Dell
IP IP Logged
barry.ein
Newbie
Newbie
Avatar

Joined: 18 Feb 2015
Location: Israel
Online Status: Offline
Posts: 12
Quote barry.ein Replybullet Posted: 04 Feb 2019 at 8:45pm
The view always starts with TW_RPT_ and then there will be 3 sets of numbers based on the user's login account ID then the scope ID and then the Query ID. The scope and query determine which records will be part of the report. the view has one column ID that is automatically linked to the PR.ID.

The view is not part of the report design and it is created only when users are generating reports from the web app.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 05 Feb 2019 at 7:03am
Is there any way for the website to know what the scope ID and the Query ID are before the report starts running? If not, there is no way to do this.

-Dell
IP IP Logged
barry.ein
Newbie
Newbie
Avatar

Joined: 18 Feb 2015
Location: Israel
Online Status: Offline
Posts: 12
Quote barry.ein Replybullet Posted: 05 Feb 2019 at 8:50pm
The login ID, Scope ID and Query ID are stored in other tables in the database so they are known before the report is generated from the web app
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.