Pregunta

I have a crystal report rpt1. I am using rpt1 as subreport of rpt2. I have following selection formula in my rpt1

rpt1.RecordSelectionFormula = " {BANK.PRID}= " & PRID & " "

Here Bank is a tbale Name

It works fine when it(rpt1) is used as independent report but when it is used as subreport of rpt2. the formula does not work. How can I apply selection formula in sub-report? i could not find enough help from google.

¿Fue útil?

Solución

YOu should use OpenSubReport to access your subreport in main report. Try this.

rpt2.OpenSubreport("rpt1").RecordSelectionFormula="{BANK.PRID}=" & PRID & ""

Otros consejos

Create a main report parameter ?PRID that your code can set. Change the design of the report to pass PRID as a subreport link. Allow the subreport link creation to filter the subreport based on the link.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top