Skip to Content
avatar image
Former Member

How to pass Sql Query in to Crystal document

Hi experts, I have a crystal report document which is accessing though c# by passing a SQL query and that works fine within main crystal report ,but if there is sub report contain and if the query is pass report doesn't generate as we expect . please find my code attachment here crystalreport.txt

crystalreport.txt (31.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Oct 25, 2016 at 02:16 PM

    Get the sample app from this KBA -

    https://launchpad.support.sap.com/#/notes/1553921

    Open your report in CR Designer and open the subreport and then save it and run it through the app and see if that works for you

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2016 at 07:41 PM

    Hi Irfan,

    I changed your Primary Tag to Cr for VS.

    What CR runtime are you using?

    It could be the Query does not match what the subreport is expecting.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi don ,

      Thanx for the reply I was using SAP Crystal Reports 13.0 . but ithis case im am not posting any querys to the sub report i just pass a query to main report .but if i remove the sub report and run it works fine i dont know how to solve this issue if u have any idea kindly post them here

      thanx in advance

  • Oct 21, 2016 at 12:55 PM

    Are you using SP 18? Latest release....

    Ah, you still need to log onto to each subreport object. So in your code adjust it so it looks if any subreports are in the report and then log on.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 25, 2016 at 11:48 AM

    Im using Latest version and i have tried pragmatical log to the sub-reports but it doesn't work for me

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 27, 2016 at 10:24 AM

    i tried but it wont work for me here its place and issue

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 27, 2016 at 01:17 PM

    What error are you getting when testing with my app?

    Don

    Add comment
    10|10000 characters needed characters exceeded