Not getting all pages of report

Posted by: goth on 4 August 2017, 2:32 pm EST

  • Posted 4 August 2017, 2:32 pm EST

    When I run a query against sql server via QA, I'm getting about 1000 hits. When I run a report using the same query, I'm only getting 13-pages. For development purposes, I've assigned the sql statement to the report datacontrol. However, at runtime, this will have to be changed. How can I do this?<br /><br />
  • Replied 4 August 2017, 2:32 pm EST

    You can reference the control through code - <br /> <br /> rpt.(DataControlName).ConnectionString = ""<br /> rpt.(DataControlName).SQL = ""<br /> <br /> update these before you call rpt.Run and they should use the new information.<br />
  • Replied 4 August 2017, 2:32 pm EST

    <p><font face="Courier New" size="2">OK, here's what I've got...<br /><br />Private Sub btnShowReport_Click()<br />  Dim sConnString As String<br />  Dim sSqlQuery As String<br /><br />  sConnString = "Provider=SQLOLEDB.1;Server=(local);Database=udbs_Development;User ID=foo;Password=bar;"<br /><br />  sSqlQuery = [really ugly select statement w/ 3-joins]<br /><br />  '-- using QA, the query returns 1,219 hits, but the report only<br />  '   shows 186 pages when it's previewed, I've a feeling the <br />  '   problem lies with the report itself<br /><br />  With arPickTicket</font></p> <p><font face="Courier New" size="2">    .DataControl1.ConnectionString = sConnString<br />    .DataControl1.Source = sSqlQuery <br />    .DataControl1.Refresh<br />  <br />    '-- set all margins to 1/2"    <br />    .PageSettings.BottomMargin = 720<br />    .PageSettings.TopMargin = 720<br />    .PageSettings.LeftMargin = 720<br />    .PageSettings.RightMargin = 720</font></p> <p><font face="Courier New" size="2">    '-- preview report<br />    .Show</font></p> <p><font face="Courier New" size="2">  End With<br /><br />End Sub<br /></font></p>
  • Replied 4 August 2017, 2:32 pm EST

    Attached is the report layout, arPickTicket.txt, in xml format
    2005/02/arPickTicket.txt
Need extra support?

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

Learn More

Forum Channels