有5个表,5个表以字段:ID做关联,程序根据用户输入的ID号,将5个表中存在此ID的所有记录以表格的形式打印出来,表格有行列和表头注释。

解决方案 »

  1.   

    用report报表就成了。将数据设置为query,用sql查询出5个表id号关联的数据即可。
      

  2.   

    select * from table5 where table5.id 
                                        in (select * from table4 where table4.id 
                                        in (select * from table3 where table3.id 
                                        in (select * from table2 where table2.id 
                                        in (select * from table1 where table1.id ))))
      

  3.   

    用grid显示,用报表打印即可。--那么如何将选出来的记录以表格的形式(有表格框、标题、注释等)打印。
    设计报表吗
      

  4.   

    上面多了一点
    select * from table5 where id 
                                 in (select * from table4 where id 
                                 in (select * from table3 where id 
                                 in (select * from table2 where id 
                                 in (select id  from table1 ))))
      

  5.   

    to xufenglong(埋头苦干):对,基本就是个报表。请问怎么做?