robert.hassel Posted March 22, 2022 Share Posted March 22, 2022 Hello, Its possible make calulated field from two reports? Example bellow: I have in repor columns A, B, C, D and now I need column E. Thank you! Robo Link to comment Share on other sites More sharing options...
jgust Posted March 22, 2022 Share Posted March 22, 2022 Pass Variables from Subreport Back to the Main Report (Shared Variables)CrystalWhen you declare your variable as SHARED you are then able to pass that variable to subreports or the main report. To use it in the main report or subreport you simply need to redeclare it and the value will be available.SHARED NumberVar shStuCount;shStuCount := DistinctCount({D_STU.STU_UNQ_ID}, {D_STU.LEA_ID});JasperThis ability is accomplished by using the “Edit Return Values” on the subreport. This allows for the main and subreport to talk to each other through the use of the specified variable. Click the add, edit, delete button to manage the shared variablesAdd the subreport variable that you want to pass to the main reportAdd the main report variable that you want to pass the variable toAdd a calculation type that you would like the shared variable to have. If you are just passing a value back and for the then “No Calculation Function” should be used. In the example above the vSubRPTVariable/vMainRPTVariable is acting as running total between the main and subreport. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now