Click here to Skip to main content
15,896,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone
i have a C# program that enables the user to make tables with specific name for the infinite number of clients in one database. so assume that we have lots of tables in one database with different names. i want the user can print the data of each of those tables he wants through the crystal reports but i don`t know how to set the report source to the report viewer and how to design the page he wants to print.
when we go through the "using the report wizard" we just can make a report and save it and then we can print it through report viewer but i want the user make it every time he needs and with every table he wants.
hope i explain good enough !
please help me.
Posted

1 solution

Saeed you have one rotten database design, I mean really bad and you are running up against the first of many problems you are going to find b/c of your lousy design.

Have the report expect a dataset/datatable and use dynamic sql to service the data base on a specific name parameter. So you bind your report to a stored procedure (even if you hard code the table name for design purposes) and change the procedure after the report is designed to get the data from the name table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900