C#存储过程中的Crystal报表 [英] Crystal report in C# store procedure

查看:111
本文介绍了C#存储过程中的Crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想连续打印一些收据。我为单次收据写了一些存储过程。

但是如何为多个收据打印存储过程。我想从客户端获取输入,例如开始收据编号和结束收据编号,并为此生成收据。所以他可以打印所有收据。



我尝试过:



我试过但是失败了。单一收据即将到来。但是接受用户输入并生成一个我没有收到的收据。

解决方案

如果你正确设计了你的水晶报告,并保留那些应该迭代的值详细信息部分,您只需要对存储过程进行细微更改。



您可以使用 LIKE 这样做。

  ALTER   PROCEDURE  MySP 

@ ReceiptNoSample VARCHAR 20

AS
BEGIN
SELECT * FROM MyTable WHERE ReceiptNo LIKE @ ReceiptNoSample + ' %'
END





此处进一步研究 - SQL LIKE运算符 [ ^ ]



希望,它有帮助:)


I want to print some receipts continuously. I wrote some stored procedure for single receipt.
but how to write stored procedure for more than one receipt print. I want to take input from client like starting receipt number and ending receipt number and generate receipts for that. so that he can take print of all that receipts.

What I have tried:

I tried For that but failed. Fro single receipt it is coming. but taking user input and generate receipts that one I am not getting.

解决方案

If you have designed your crystal report correctly with keeping the values those are supposed to be iterated in the details section, then you just need to do minor changes in the stored procedure.

You can make use of LIKE to do so.

ALTER PROCEDURE MySP
(
  @ReceiptNoSample VARCHAR(20)
)
AS
BEGIN
  SELECT * FROM MyTable WHERE ReceiptNo LIKE @ReceiptNoSample+'%'
END



Further study here - SQL LIKE Operator[^]

Hope, it helps :)


这篇关于C#存储过程中的Crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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