Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing through Crystal to PDF
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00927708
Message ID:
00927712
Views:
24
Hi Kevin

Thanks for the quick response!!

dsOrder is coming from a middle tier component that calls stored procedures and passes back datasets... but the funny thing is (if I understand how it should work!) is that when I use the database expert and build up my report using the orders table then create a dataset from the same table but only containing the one order, when I do crReportDocument.SetDataSource(dsOrder) I still get all the orders back...

Is crReportDocument.SetDataSource(dsOrder) all I need to do? Or am I missing something else?

I have found this which works...
Dim strSelect As String = "{usrOrders.OrderID} = " & CType(Request("OrderID"), String)
		crReportDocument.RecordSelectionFormula = strSelect
But I can see that this isn't going to work for the more complex reports I am going to need... I really need to be able to specify the dataset to be used for the report at runtime.

I am interested in the XSD approach, I will have a look!

Thanks

>Chris,
>
>Follow-up, because I just now realized you had a setdatasource in your original code.
>
>I don't know if dsOrder is a dataset that you created in code, or something you pulled back from SQL Server. But at runtime, you can specify an entirely different set of tables from a dataset (including tables that contain just one order), so long as they follow the same structure and order as the tables you used at design-time.
>
>So at design-time, when you use the database expert, you can point to tables from SQL to get the structure, or you can use an XSD definition that you created in VS.NET (I prefer the XSD approach) - and then at runtime, you can use setdatasource on each table to tell Crystal where to get the actual data.
>
>Again, let me know if that helps.
>
>Kevin
Chris Maiden
Email
Web
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform