0

Hi,

in my project I need to allow the user (admin user) to have the ability to run custom queries on the database. Ive done this pretty simply whwer the user enters their query and the reults are set to a datagridview.

It would also be great however to allow the user to print the results of their custom query. For this I thought the easiest thing to do would be to use a crystal report.

However the problem Im encountering is that because the dataset that the datagrid is populated from is empty until the user fires the query, the crystal report cant find any source for the data to be displayed.

Can anyone think of a better way to do this or am I approaching this in completely the wrong way?

Hope that makes sense and thanks in advance!

Edited by jlivvers: n/a

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by sandeepparekh9
-1

hi...

suppose your dataset is DS

check this kind of condition..

if DS.Tables(0).Rows.Count >0 then

"load your report"

else

MessageBox.Show("Nothing to Print")

End IF

Edited by sandeepparekh9: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.