如何为连接的表创建报告 [英] How do I create a report for a joined tables

查看:62
本文介绍了如何为连接的表创建报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不使用数据集的情况下创建报表,而是使用查询我已经连接了datagrid中显示的表格,并且我希望这些连接表在报表中可用,查询是



SELECT OrderLine.PName,OrderLine.Qty,(Product.PUnitPrice * OrderLine.Qty)AS Price FROM Product JOIN OrderLine ON Product.PName = OrderLine.PName AND OrderLine.OId =(SELECT MAX(OId)FROM订单)

I want to create a report without using data set, instead using a query I have joined tables that are shown in datagrid and I want those joined table to available in report the query is

SELECT OrderLine.PName,OrderLine.Qty,(Product.PUnitPrice*OrderLine.Qty)AS Price FROM Product JOIN OrderLine ON Product.PName = OrderLine.PName AND OrderLine.OId=(SELECT MAX(OId) FROM Orders)

推荐答案

使用您创建的程序报告在sql中创建存储过程

create store procedure in sql
by using the procedure you create report


这篇关于如何为连接的表创建报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆