cancel
Showing results for 
Search instead for 
Did you mean: 

Schema@ parameter in subreport

Former Member
0 Kudos

Hi,

i created a reports that is dynamically deployed to the target SAP Business One system with different company schema names using the "Add Command" function of Crystal Report to retrieve the data from SAP Business One companies as data source instead of accessing to direct tables

or procedure of a fixed company schema with the default parameter of Crystal Report Schema@, and it's working properly.

Now I need to create a subreport and I would do the same thing to make dynamic report using Schema@ in the subreport, but the schema name of current company loging on to SAP Business One is not passed to the subreport during runtime when the report is viewed from the SAP Business One Client.

Is there a way to ensure that the parameter Schema@ is also recognized in the subreport ?

Thanks in advance,


Michele

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Edit the subreport link and set it to the same parameter as the main report.

Former Member
0 Kudos

The Schema@ parameter is created in the Query Panel,and it doesn't appear in the subreport link

0 Kudos

If you create the report in CR Designer with your Data source and then add a subreport to your main report you will have a subreport link option under Edit, Subreport Link.

This is where you link the main report to the subreport.

Don

Former Member
0 Kudos

I didn't create a static report where the data source and the database is defined and static; instead using the parameter Schema@ defined using the "add command" in the data source, you can get a query like this:


SELECT “CardName” AS “Customer Name”, SUM(“DocTotal”) AS “Invoice Amount”

FROM “{?Schema@}”.”OINV”

where the schema name of current company loging on in SAP Business One is passed to Crystal Reports during runtime when the report is viewed from the SAP Business One Client.

Now, this parameter Schema@ does not exist in the Subreport link in the edit option, so i don't know how to link pass the Schema@ value from the main report (where it works properly) to the subreport.

Michele

abhilash_kumar
Active Contributor
0 Kudos

Hi Michele,

Assuming you've created a Schema@ prompt in the subreport's query too and its datatype matches with that of the Main report's prompt, the prompt should appeart in the Subreport's link screen.

Once you're at the 'Change Subreport Links' option, move the 'Schema@' prompt from the 'Available Fields' pane to the 'Fields to link to' pane.

Then, check the option 'Subreport parameter field to use' (which is at the bottom left) and choose the 'Schema@' prompt from the dropdown to complete the link.

-Abhilash

Former Member
0 Kudos

Thanks Don and Abhilash. Now it works.

Answers (0)