data controls...

Posted by: kmac303 on 4 August 2017, 2:44 pm EST

  • Posted 4 August 2017, 2:44 pm EST

    I am running a report to build a letter, but the letter needs data from two different sources. The form will only allow 1 data control, but I am figuring that the one data control can be closed and reopened to bring in the other data. The other data connection will be SQL rather that from an .dbf file though. Reason being the data is obviously coming from two different sources to be put on the letter. Is this an easy manipulation?
  • Replied 4 August 2017, 2:44 pm EST

    I would personally recommend using subreport(s) to do multiple connections (the whole point of subreports is to bring multiple recordsets together into one report) or do an unbound report where can directly control your data flow. There is also the power of a SQL Join statement, but for this case were you have two completely different database management systems that will not work.
  • Replied 4 August 2017, 2:44 pm EST

    Each Field/Textbox control has an OutputFormat property, which is very similary to the VB Format function. You should also have a DataValue property which is raw unformated data from the datasource and a Text property which is post formatted (OutputFormat applied) data. OutputFormat can take strings for custom formating (like $#,##0.00 for currency) or you can use it's dialog to create/use standard formats.
  • Replied 4 August 2017, 2:44 pm EST

    Ok, well I did get the subreports going and working good. Now I have to have the fields with $ signs in all of the fields. Is there an easy solution for this?? I know that the fields are just getting plugged with data and I'm not sure that there is a format change for a field component.
  • Replied 4 August 2017, 2:44 pm EST

    Well my dilema is that I have a report that has 2 subreport(columns) next to each other. I have to run the 1st subreport until I have 30 records into it, then the second subreport(column on the right) will run from that ending spot. So I could have 2 columns with 30 rows. The second subreport(column) can't run until the 1 subreport hits the 30 records. This seems like a very deep challenge....
  • Replied 4 August 2017, 2:44 pm EST

    I have manually taken control of columns and page jumping in the past by using code along the lines of the following...

    Private Sub Detail_Format()
        Static intCol As Integer
        Static intPage As Integer

        intCol = intCol + 1
       
        If intPage >= 3 Then
            Detail.NewPage = ddNPBefore
            intPage = 0
           
        ElseIf intCol > 10 Then
            Detail.NewColumn = ddNPBefore
            intCol = 0
            intPage = intPage + 1
           
        Else
            Detail.NewColumn = ddNPNone
        End If
    End Sub



    I would recommend double checking your critiera for creating the subreport (datasource/recordset) and your cangrow settings to make sure the report can grow to accomidate for all of your subrows.
  • Replied 4 August 2017, 2:44 pm EST

    As soon as I wrote the post I went and played around with it and noticed it is kind of like an excel field with their formats.  Now my next question is how do I make sure there is only a certain amount of records to print in one column of the letter and once it hits that amount it goes to the next column and starts from there? Is that an easy thing? Because it seems the subreport builds itself without running through every single record.
  • Replied 4 August 2017, 2:44 pm EST

    No, both of the columns are from the SQL database file. I just need the columnB to fill once the columnA hits the 30 record limit. Because a customer could have more than 30 records, so I have to start from the 30th record at the top of columnB and fill with whats left. Yet they could have more than 60, so I might be creating another page to take after the 60 records fill. I just don't know how to go about the 2 columns of subreports A & B. once A is filled, start to fill B from the next record in A from an SQL database.
  • Replied 4 August 2017, 2:44 pm EST

    So you have subreportA that needs 30 records from SQL then subreportB that alos needs 30 correstponding records from the .dbf file?
  • Replied 4 August 2017, 2:44 pm EST

    From what I am getting I will just have to hard code another set of column headers in right?

  • Replied 4 August 2017, 2:44 pm EST

    Ok, so I fell into question again. Right now I have the columncount set to 2. Its going acrossdown. And it works and looks fine if I have atleast 2 records, because up in the groupheader I have just copied the labels over for the second column. My question is how do I get that header to print only when it goes to the next column?
  • Replied 4 August 2017, 2:44 pm EST

    If you want your groupheaders/footers to follow the Column layout you need to set ColumnLayout to true.

    Did you have Underlaynext set to true for your header? That would cause data to be printed over the top of it.
  • Replied 4 August 2017, 2:44 pm EST

    Yeah, I have the underlayout to FALSE and the ColumnLayout to TRUE. It still prints that second record in the header area instead of the header again.
  • Replied 4 August 2017, 2:44 pm EST

    Nevermind, I set the ColumnLayout to FALSE and it won't print any records in the Group Headers or footers. I should be good to go. If not I will be back. thanks for the support. I appreciate all the help you have given.

  • Replied 4 August 2017, 2:44 pm EST

    From what I am getting I will just have to hard code another set of column headers in right?

  • Replied 4 August 2017, 2:44 pm EST

    Ok, I think I got the jist of it. Now when I set the subreport page to except 2 columns downacross. I have groupheader and footers. I put the headings in the header area and the datafields in the detail section. Well it seems to start the first record on top of the headings in the 2nd(right) column though. It creates a gray area in the detail section when I changed the Detail Properties to 2 columncount. I guess I don't care either way if it goes down or across as long as my records aren't mixed in with the data.
  • Replied 4 August 2017, 2:44 pm EST

    The next step would probably be to upload your designer files and let someone on the DD team take a look at them and see if they can provide a more pinpointed answer to your case here. 
  • Replied 4 August 2017, 2:44 pm EST

    It still puts the data into the group header instead of copying over the groupheader labels. I made sure I have the column layout to TRUE and the UnderlayNext to FALSE. I don't see why it should be pulling from it. I upgraded to the Standard Edition Build: 2.4.0.1279   ( Download) 5,336KB .
  • Replied 4 August 2017, 2:44 pm EST

    Oops, I didn't know we went over to 2 pages there. I have been writing the same post for awhile. I am going to upgrade and see if that works. Thanks
  • Replied 4 August 2017, 2:44 pm EST

    I have to have the columnlayout set to false in order to keep the data down in the detail section, otherwise the data is up in the header. I need the header to copy over to the next column. I have a header up in the group header section. So is it only possible hard code the header section with labels for the second columns? Because it doesn't copy over the groupheader labels.
  • Replied 4 August 2017, 2:44 pm EST

    From your description of what you want, you shouldn't need to hard code anything. Which version of AR are you using? If it is not the latest, considering upgrading.

    http://www.datadynamics.com/ShowForum.aspx?ForumID=37
  • Replied 4 August 2017, 2:44 pm EST

    A screenshot with differently-colored section backgrounds and a little drawing on it may also help.  I am lost as to what is actually being requested here.

    Thanks for the help, wsmith.
  • Replied 4 August 2017, 2:44 pm EST

    Here is a screen shot of what I have. As you can see I am trying to get the headings in the GroupHeader section to copy over when it fills the right column with data. Right now I only can hardcode that in....

  • Replied 4 August 2017, 2:44 pm EST

    If you're using the column direction of AcrossDown, it will do exactly like your image shows. If you use DownAcross, it will repeat at the top of the column.
  • Replied 4 August 2017, 2:44 pm EST

    That just repeats the column headers on every single record that is displayed. I am going accross down for a more visual pleasing flow. I have attached what it looks like if I do that...

  • Replied 4 August 2017, 2:44 pm EST

    Set the ColumnLayout to True and Repeat to 2 - ddRepeatOnColumn.
Need extra support?

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

Learn More

Forum Channels