HI ALL

Posted by: cabecinhas on 4 August 2017, 2:50 pm EST

  • Posted 4 August 2017, 2:50 pm EST

    Hey i need to do a report where i put the DATE and the system will returns me all hte product sold on that day.


    Example:


    10/10/2006
    CPU - PIII 2700
    COOLERCPU - PIII 2700
    HD200GB
    COOLERCPU - PIII 2700
    COOLERCPU - PIII 2700
    VIDEO CART

    11/2006
    SOUND CARD 2700
    CPU - PIII 2700
    COOLERCPU - PIII 2700
    COOLERCPU - PIII 2700
    COOLERCPU - PIII 2700
    VIDEO CART


     


    What should i need?

    THANK YOU ALL

  • Replied 4 August 2017, 2:50 pm EST

    I would suggestion looking here to begin familarizing yourself with ActiveReport events. http://www.datadynamics.com/forums/306/ShowPost.aspx


    Assuming that rlt_HDESK_MSG is your subreport object and that subreport object is in your main's detail section you could do something long the lines of the following...


    Parent Report
    Private Sub Detail_Format()
        rlt_HDESK_MSG.vvalue  = txtint_ID.DataValue 
    End Sub



    Sub Report
    Public vvalue as integer


    Private Sub ActiveReport_ReportStart()
        DataControl1.Source = "Select * from tbl_HDESK where intid_MESTRE = " & vvalue    
    End Sub

  • Replied 4 August 2017, 2:50 pm EST

    Didn't work:(

    all i'm getting is the same.. the datacontrol1.source is not getting any change:(


     

  • Replied 4 August 2017, 2:50 pm EST

    If you run that SQL statement ouside of ActiveReports with the same parameter(s) do you get a return of more than 0 records?


    Also this example seems to be very close to what you are attempting to do, so a look at it would be beneficial in my opinion. http://www.datadynamics.com/forums/302/ShowPost.aspx

  • Replied 4 August 2017, 2:50 pm EST

    IT WORKED OUT   


     


     


    Thank you  now its worning..

    what i was doing wrong was that i wasn't gettinmg the current value at the ActiveReport_FetchData then the value was always the same..


    now its ok..


    just  for finishing this topic... at my SQL database i have some "vbcrlf" and on reports is showed as a litlle square.. whats that? how can u do to solve this?


     


     


    Thank you SO MUCH


    Rodrigo

  • Replied 4 August 2017, 2:50 pm EST

    Some VB coded Replace statements or Instr functions should do the trick or maybe look at RichText controls and formatting.
  • Replied 4 August 2017, 2:50 pm EST

    Looking for answers i've got the SUBREPORT SOlutions and it worked but not too well lol


    I'm trying to set a parameter to the subreport DataControl but its not making any effect.

    See:


    'at the subreport
    Public vvalue as integer

    Private Sub Detail_Format()
        DataControl1.Source = "Select * from tbl_HDESK where intid_MESTRE = " & vvalue    
    End Sub


    At the parent report
    rlt_HDESK_MSG.vvalue  = txtint_ID.DataValue


    I'm always getting the 0 at the subreport..


    what am i doing wrong?

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels